# Printing CUPS/SAMBA

## OldManRiver

All,

I have a Gentoo server, which we have tried over and over to get to print.  Our printer is an HP 4L and runs off a LinkSys EPSX3.

I have SAMBA working where I can see the Gentoo box from Windows and have smbmounts working to see Windows from Gentoo, but I think I still have a SAMBA problem as I have to use IP addressing to see any windows shares and I have to do it manually.  I tried putting the same commands into a script and even with full direct path name I get errors from the scripts.

The EPSX3 is on DHCP and NetBeui so I currently cannot directly see the printer, only the Windows share for it on the Windows box.  I'm having to run an smbmount command to the Windows box to link the printer.

I can not get anything to see or link to/define the printer in either the smb.conf or the cupsd.conf files.  I need some help here as I still don't really understand all the SAMBA and CUPS nuainces.

Thanks in advance!

OMR

----------

## jstead1

I think your print server supports IPP, (at least the specs say it does) and so does linux.

See the Gentoo Printing Guide for details.

(IPP doesn't use SAMBA, so you won't need it for printing, but you will need to install the printer into CUPS, this is in the gentoo printing guide as well.)

----------

## OldManRiver

JST1,

I think you are expecting that I'm able to see this printer in the Network Browser or that is has a static IP.  Neither is the case, as I described earlier.

Thanks!

OMR

----------

## ok

I also have a HP LJ4L, connected directly to my Windows PC and using the share to access the printer from my linux box. I configured the printer with CUPS ( http://127.0.0.1:631/ ).

I only start samba if i want to share files from my linux box, don"t need to start it for printing.

HowTo: http://gentoo-wiki.com/HOWTO_print_winserver

----------

## bunder

 *ok wrote:*   

> 
> 
> HowTo: http://gentoo-wiki.com/HOWTO_print_winserver

 

you don't need print services for unix with cups.  

add printer -> network printer -> enter in URL.  (IIRC its http://printer:631/printers/printername or http://printer:631/printerclass/classname)

cheers

----------

## jpl888

 *Quote:*   

> All,
> 
> I have a Gentoo server, which we have tried over and over to get to print. Our printer is an HP 4L and runs off a LinkSys EPSX3.
> 
> I have SAMBA working where I can see the Gentoo box from Windows and have smbmounts working to see Windows from Gentoo, but I think I still have a SAMBA problem as I have to use IP addressing to see any windows shares and I have to do it manually. I tried putting the same commands into a script and even with full direct path name I get errors from the scripts.
> ...

 

Your printer is attached to the Linksys right? So you don't need to use samba to print to it. It should support IPP and therefore the client part of CUPS will be all you need to print to it from Gentoo.

Having looked at the Linksys website version 2 of this yoke supports IPP, so CUPS is your ticket if I have read you right.

----------

## OldManRiver

 *jpl888 wrote:*   

> Your printer is attached to the Linksys right? So you don't need to use samba to print to it. It should support IPP and therefore the client part of CUPS will be all you need to print to it from Gentoo.
> 
> Having looked at the Linksys website version 2 of this yoke supports IPP, so CUPS is your ticket if I have read you right.

 

Yes printer is attached to LinkSys, but Samba cannot see it as it uses DHCP not static IP, so IPP has trouble finding it.

I tried using CUPS to browse for it, but since Samba can not see it and it really is all NetBeui, (IP only works if NetBeui finds it) then nothing else CUPS or SAMBA tries seems to work.  Also a note about the LinkSys, it totally aborts if I try to set a static IP.  I'm not sure why and it works fine with all the Windows machine as is, so not touching it.  Beside we are having ISP stability problems, so I posted at:

https://forums.gentoo.org/viewtopic-t-533062-highlight-.html

because I need to monitor two lines and distribute throught the GenToo box.  One Line distributes 192.168.1.x and the other 192.168.10.x so forcing the LinkSys to conform is bad, just having to reboot LinkSys everytime we manually change lines.

My partner and I have been trying to solve the Samba problem for sometime, and we are told that we should see all windows shares with either "smbtree" at the terminal or in the "Network" folder on GNOME, but neither work.  I've been told that this print server will never be seen or work, until Samba can see all the windows shares, but if you think not, tell me how to get around it.

My partner found some excerpts online, indicating the default e-build for Gentoo Samba is missing key items.  He forgot to bookmark this and once he followed the procedure, posted on the Samba defficiencies, Samba saw all the Windows shares, but then we lost it, because we somehow screwed the smb.conf file.

Anything that helps solve this would leave us elated as we have fought this for weeks now, without any sight of a real solution.

Thanks!

OMR

----------

## jstead1

I just want to make it clear that sharing a printer by IPP has nothing to do with samba, smb, or Netbeui.  Sharing a printer with samba over netbeui is a cludge.  Use IPP if it is available, and in your case it appears to be a viable option.  Forget samba (for print sharing anyway).  You won't see the printer using samba if it is shared using IPP, they are different protocols.  If you already understood this, my apologies.

----------

## jpl888

OldManRiver, myself and jstead1 are basically telling you that you are trying to do this the wrong way.

I'm assuming that your ultimate goal is for all the Windows machines to be able to print through the Linksys.

The simplest thing to do is connect the windows machines directly to the Linksys using IPP.

That means you shouldn't be using NETBEUIE at all.

You don't need CUPS or Samba on the Linux machine to use IPP on the Windows machines.

If you want to print from the Linux machine to the Linksys THEN you should have have CUPS installed on it.

As for IP addresses if you cannot get the Linksys to take a static IP then I would suggest reflashing it as there is obviously something wrong with it if that is the case.

Going back to the Windows machines, Windows XP supports IPP out of the box, but older clients will need some kind of driver.

My feeling from your posts is that you don't understand some of the fundamentals of networking or TCP/IP or you wouldn't be trying to use NETBEUI in the first place.

Please feel free to ask questions regarding any areas you are vague on.

----------

## OldManRiver

 *jpl888 wrote:*   

> As for IP addresses if you cannot get the Linksys to take a static IP then I would suggest reflashing it as there is obviously something wrong with it if that is the case.
> 
> Going back to the Windows machines, Windows XP supports IPP out of the box, but older clients will need some kind of driver.
> 
> My feeling from your posts is that you don't understand some of the fundamentals of networking or TCP/IP or you wouldn't be trying to use NETBEUI in the first place.

 

JP,

I guess I need to explain the LinkSys EPSX3, it is an older box that was produced when NetBeui was King, and TCP/IP was just emerging.  There are no flash updates for this box as it is no longer supported.  I upgraded, I think, to the latest version of the Flash (Just checked and I have version 6013, Anyone knowing of a later version and where to download, will be helpful).  Needless to say the EPSX3 does not play well with IP, and does depend primarily on NetBeui, so much so that the Bi-Admin tool for it will not see it, nor will Windows see it without NetBeui installed.  If you only have the TCP/IP protocol installed on your windows box you are toast with this Print Server.

Of course if you did not know this, nor take the time to look it up, then I understand your comment about thinking I do not know TCP/IP.

If this is the issue and I can not get past it, I will have to re-assign this printer to the NetGear print server than can work without NetBeui installed.  The problem with static IP on this box is two fold: 1.) The Network masking is constantly changing and will until I get my GenToo box monitoring the two ISPs and make it the Network DHCP server, not the ISP gateway routers, 2.) Something in the DNS setting doesn't work right and cause the box to no longer be seen.  I then am force to "RESET" to get the box back and visible to the network.

As for IPP on windows, I run Win2K Pro, so will I need an add-in for that?  If so where do I find it?

All the Unix/Linux Gurus I know, say it is not the LinkSys Box, as they looked up it's specs, and gave me that answer.  They all say I have to have Samba config'd right and it will show with NetBeui, just fine.  I keep being told I have a Samba config problem as I can not:  1.) Issue the "smbtree" command in the shell and see the Windows shares, 2.) I do not get automatic searching for and location of Windows shares, 3.) I see no Windows shares in the "Network" folder under "Computer" in the GNOME session.

I've been told once these config issues are resolved I will see the printer and will be able to print to it.

Thanks!

OMR

----------

## darkphader

 *OldManRiver wrote:*   

> They all say I have to have Samba config'd right and it will show with NetBeui, just fine.

 

Not true. Samba does not talk NetBEUI, it does talk NetBIOS over TCP/IP which, sorry to say, is not the same. If NetBEUI is necessary to talk to the device you are plain out of luck. Get a different print server (maybe look for a used Axis on ebay).

Chris

----------

## jpl888

 *Quote:*   

> Of course if you did not know this, nor take the time to look it up, then I understand your comment about thinking I do not know TCP/IP. 

 

I did look it up, or did you not read my first post?

 *Quote:*   

> Having looked at the Linksys website version 2 of this yoke supports IPP, so CUPS is your ticket if I have read you right.

 

I can understand you getting a bit defensive but as darkphader pointed out you don't seem to know the difference between NETBEUI and NETBIOS.

If I phrased things badly I apologise.

I am only trying to help   :Very Happy: 

In answer to your last question, it seems I was slightly wrong according to this Microsoft KB article http://support.microsoft.com/kb/248344 Windows 2000 supports IPP printers natively so you don't need a special driver for IPP. I have a copy of Windows 2000 running in Vmware and a printer shared via CUPS and IPP, I can set a driver up and tell you how to do it if you like?

Also the other way to approach this is to connect the printer directly to your Linux box and share it via CUPS and IPP in the same way I do. It's all good as long as you don't use NETBEUI, or NETBIOS for that matter.

Cheerio.

----------

## jstead1

 *OldManRiver wrote:*   

> JST1,
> 
> I think you are expecting that I'm able to see this printer in the Network Browser or that is has a static IP.  Neither is the case, as I described earlier.
> 
> Thanks!
> ...

 

My last post to this thread.

It doesn't need a statuc IP.  I know the router has or can be given a host name.

From the Gentoo Printing Guide previously referenced.

"Configuring a Windows Client for IPP

Microsoft Windows supports IPP (Windows 9x and ME users need to install it separately). To install a printer that is attached to your Linux box on Windows, fire up the Add Printer wizard and select Network Printer. When you are asked for the URI, use the http://hostname:631/printers/queue syntax. "  So you don't need a static IP, you need a host name.  You don't need extra stuff for windows 2000, it already supports IPP.  If you had read the printing guide you would know this.

I really do like to try to help people, but you seem bound and determined to setup this printer through samba.  It is just the wrong way to go.

Bye

----------

## darkphader

 *jstead1 wrote:*   

> It doesn't need a statuc IP.  I know the router has or can be given a host name.
> 
> <snip>
> 
> When you are asked for the URI, use the http://hostname:631/printers/queue syntax. "  So you don't need a static IP, you need a host name.

 

Not quite so simple. The host name has to be resolvable and CUPS is not going to use NetBIOS broadcasts. Therefore without DNS or hosts (or possibly WINS) resolution a hostname by itself will mean nothing. Basically "servers" should have static/fixed IP addresses (they can be assigned by DHCP but reserved so that they're always the same). In this case I see no reason why the print server in question cannot have a static IP address, it's absurd to have it assigned via DHCP unless it's a reserved address. Easiest solution is to make it static and use hosts resolution (unless you have a DNS server - preferred). If there's some reason to insist on dynamic assignment than use a DNS server configured to support dynamic updates or possibly set Samba up as a WINS server, build it with winbind, set the print server to register itself with the WINS server, then use wins as an option in nsswitch.conf (clearly reaching a bit, maybe workable, and the least desirable option).

I do repeat, for the OP, and with emphasis - give it a static IP address.

Chris

----------

## OldManRiver

 *jpl888 wrote:*   

> 
> 
> I'm assuming that your ultimate goal is for all the Windows machines to be able to print through the Linksys.
> 
> 

 

Sorry all have been in the field steady, so just getting back to this!

Answer to the above quote is they already do, but GenToo will not!

That is where my frustration lies!

If it appears that I'm taking offense to any input, I'm not.  I take each suggestion and try to apply it.  When it doesn't work that when I get on the peaved side, but I don't mean anything personal, just that it still is not working.

OMR

----------

## OldManRiver

 *darkphader wrote:*   

> Not quite so simple. The host name has to be resolvable and CUPS is not going to use NetBIOS broadcasts. Therefore without DNS or hosts (or possibly WINS) resolution a hostname by itself will mean nothing. Basically "servers" should have static/fixed IP addresses (they can be assigned by DHCP but reserved so that they're always the same). In this case I see no reason why the print server in question cannot have a static IP address, it's absurd to have it assigned via DHCP unless it's a reserved address. Easiest solution is to make it static and use hosts resolution (unless you have a DNS server - preferred). If there's some reason to insist on dynamic assignment than use a DNS server configured to support dynamic updates or possibly set Samba up as a WINS server, build it with winbind, set the print server to register itself with the WINS server, then use wins as an option in nsswitch.conf (clearly reaching a bit, maybe workable, and the least desirable option).

 

Finally maybe a light in this????

I think something else, maybe DNS or WINS is too blame for why the host names do not resolve and why I see none.

Maybe if I can solve that the IPP/CUPS/Printing problem will seem like an automatic fix????

By the way, Windows share for the LinkSys is:

\\SCA18563\P1

it also supports:

\\SCA18563\P2

\\SCA18563\P3

since it is a 3 port print server.

If we can resolve the issue with why I can not see any Windows Network shares then I think this will config rather easily, but not sure at this point.

Also Gentoo infomed me today that my Samba and Cups files need to be re-emerged so I did.  Wondering if that will have any impact on this problem?

Since getting this right mean my smb.conf file must be right & the cups.conf, I pasting them in here:

SMB.CONF

```
# Samba config file created using SWAT

# from 127.0.0.1 (127.0.0.1)

# Date: 2007/02/16 12:59:46

[global]

   netbios name = GENTOO_NYLE

   workgroup = DAVISOFT

   server string = LDAP PDC

   # server string = Samba Server

   security = user

   # security = share

   os level = 65

   wins support = yes

   load printers = yes

   browseable = yes

   printcap name = cups

   printing = cups

   cups options = "raw"

   use client driver = yes

   # use client driver = no

   # name resolve order = wins lmhosts host bcast

   # wins support = no

   name resolve order = lmhosts host bcast

   dns proxy = no

   # interfaces = eth2

   # domain master = no

   # domain master = yes

   # preferred master = no

   # preferred master = yes

   # domain logons = yes

   # logon script = login.bat  OR %U.bat

   # logon path = \\%L\profiles\%U

   # logon drive = H:

   # logon home = \\%L\%U\.9xprofile

   # time server = yes

   # log file = /var/log/samba/log.%m

   # max log size = 50

   # smb passwd file = /var/lib/samba/private/smbpasswd

   # encrypt passwords = yes

   # lock directory = usr/local/samba/var/lock

[public]

   hosts allow = 127.0.0.0/8 192.168.10.0/24

   # security = user

   security = share

   encrypt passwords = yes

   socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

   interfaces = lo eth0 eth1 eth2

   bind interfaces only = yes

[print$]

   comment = Printer Drivers

   path = /etc/samba/printer # this path holds the driver structure

   guest ok = yes

   browseable = yes

   read only = yes

   # Modify this to "username,root" if you don't want root to

   # be the only printer admin)

   write list = "username,root"

[printers]  # here all printers will be shown; this becomes the Printers

            # share/section under Network Neighborhood

   comment = All Printers

   guest ok = yes

   writable = no

        Printer admin = printer_username,root 1.*

   browseable = yes

   printable = yes

   public = yes

   # create mode = 0700

   guest only = yes

   guest account = smbprint

   path = /etc/samba/smbprint

[HP-4L] 

   comment = HP-4L on Windows Server

   guest ok = yes

   writable = no

   browseable = yes

   printable = yes

   public = yes

   # create mode = 0700

   guest only = yes

   guest account = smbprint

   path = /etc/samba/smbprint

[install_cds]

   comment = Server Connect = CDs

   path = /var/shared-files/install_cds

   guest ok = yes

   browseable = yes

   writable = yes

   valid users = administrator nyle root

   public = no

   printable = no

   create mask = 0765

[bids_plans]

   comment = Server Connect = CDs

   path = /var/shared-files/bids_plans

   guest ok = yes

   browseable = yes

   writable = yes

   valid users = administrator nyle root

   public = no

   printable = no

   create mask = 0765

[print_howto]

   comment = Printing Setup Howto Files

   path = /var/shared-files/print_howto

   guest ok = yes

   browseable = yes

   writable = yes

   valid users = administrator nyle root

   public = no

   printable = no

   create mask = 0765

[school]

   comment = Folder for North Lake College Unix Classes

   path = /var/shared-files/school

   guest ok = yes

   browseable = yes

   writable = yes

   valid users = administrator nyle root

   public = no

   printable = no

   create mask = 0765

```

CUPSD.CONF

```
#

# "$Id: cupsd.conf.in 5454 2006-04-23 21:46:38Z mike $"

#

#   Sample configuration file for the Common UNIX Printing System (CUPS)

#   scheduler.  See "man cupsd.conf" for a complete description of this

#   file.

#

# Log general information in error_log - change "info" to "debug" for

# troubleshooting...

LogLevel debug

# LogLevel info

# Administrator user group...

SystemGroup lpadmin

# Only listen for connections from the local machine.

Listen localhost:631

Listen /var/run/cups/cups.sock

Listen /etc/samba/smbprint

# Show shared printers on the local network.

Browsing On

BrowseOrder allow,deny

BrowseAllow @LOCAL

# Default authentication type, when authentication is required...

DefaultAuthType Basic

# You may prefer to visit http://localhost:631/ rather than edit this directly.

<DefaultPrinter HP-4L>

  Info HP LaserJet 4L

  Location usb:/etc/samba/smbprint

#  DeviceURI usb://hp/LaserJet%201000 

  DeviceURI usb:/etc/samba/smbprint 

  State Idle

  Accepting Yes

  JobSheets none none

  QuotaPeriod 0

  PageLimit 0

  KLimit 0

</Printer>

# Restrict access to the server...

<Location />

  Order allow,deny

  Allow localhost

</Location>

# Restrict access to the admin pages...

<Location /admin>

  Encryption Required

  Order allow,deny

  Allow localhost

</Location>

# Restrict access to configuration files...

<Location /admin/conf>

  AuthType Basic

  Require user @SYSTEM

  Order allow,deny

  Allow localhost

</Location>

# Set the default printer/job policies...

<Policy default>

  # Job-related operations must be done by the owner or an adminstrator...

  <Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  # All administration operations require an adminstrator to authenticate...

  <Limit Pause-Printer Resume-Printer Set-Printer-Attributes Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Add-Printer CUPS-Delete-Printer CUPS-Add-Class CUPS-Delete-Class CUPS-Accept-Jobs CUPS-Reject-Jobs CUPS-Set-Default>

    AuthType Basic

    Require user @SYSTEM

    Order deny,allow

  </Limit>

  # Only the owner or an administrator can cancel or authenticate a job...

  <Limit Cancel-Job CUPS-Authenticate-Job>

    Require user @OWNER @SYSTEM

    Order deny,allow

  </Limit>

  <Limit All>

    Order deny,allow

  </Limit>

</Policy>
```

Maybe one of you can spot why the code doesn't work.  Also I can post other files on WINS and DNS if needed!

Thanks!

OMR

----------

## OldManRiver

All,

A friend wrote the following in an email:

 *Quote:*   

> If you were to try to bring up a WINS server (wins support = yes), WINS translates \\machinename to IP.

 

This is fact the problem, none of the windows machines show without a SMBClient command with hardcoded IP addresses, therefore WINS is screwed and not resolving any host names.  Therefore, we can never see the print server.

This friend also wrote:

 *Quote:*   

> It is possible to reserve IP addresses in your DHCP server based on the MAC address of the print server.

 

I believe that means the GenToo box must be set up as the DHCP server and not our current router(s), unless we solve our autorouting problem we posted at:

 *Quote:*   

> https://forums.gentoo.org/viewtopic-t-533062-highlight-.html

 So I can switch to picking up all network traffic from my Gentoo box insted of the sometimes up, sometimes down connectivity we have here.  A note on that: our default is at 70MB and our backup is AT&T ADSL (256K upload) so backup mode sucks.

I'm just too noobie 2 Gentoo, so need lots of help!

Thanks!

OMR

----------

## OldManRiver

All,

I found the following resources that seem very well written and in depth.  Have not had time to fully analyze or apply just yet but wanted to share, in case anyone had some insight before I started trying to implement, as some of the previous "HOWTOO's"  did anything but that:

 *Quote:*   

>  http://www.linuxforums.org/forum/linux-tutorials-howtos-reference-material/54415-fileserver-samba-printserver-cups-howto.html
> 
> and
> 
> http://library.pantek.com/Applications/Samba/Samba-3%20HOWTO%20and%20Reference%20Guide/NetworkBrowsing.html#id2554336

 

I noticed the in-depth treatment of each of these on WINS, which is where I think I'm having my problem.

Thanks!

OMR

----------

## OldManRiver

All,

Still fighting to get backup after my disk full error at:

 *Quote:*   

> 
> 
> https://forums.gentoo.org/viewtopic-p-4077128.html#4077128
> 
> 

 

So not able to jump back on this just yet.  Just curious though as to whether my reboot problems are somehow related to my postings here on Samba, since that is part of the problem in rebooting?

Thanks!

OMR

----------

## OldManRiver

All,

Finally resolved all my issues with the disk full and relocating the portage and dist directories so now back to this issue.

Now open to input here again!

Where I'm at is that when I run:

```
/etc/init.d/samba start
```

I get nothing, it hangs. and I must use ^C to get back to the command prompt.

Any input/ideas on that?

Thanks!

OMR

----------

## darkphader

try running testparm

----------

## OldManRiver

 *darkphader wrote:*   

> try running testparm

 

Ok here are my results from testparm:

```
localhost ~ # testparm

Load smb config files from /etc/samba/smb.conf

Processing section "[print$]"

Processing section "[printers]"

WARNING: The "Printer admin" option is deprecated

Global parameter guest account found in service section!

Processing section "[HP-4L]"

Global parameter guest account found in service section!

Processing section "[install_cds]"

Processing section "[bids_plans]"

Processing section "[print_howto]"

Processing section "[school]"

Loaded services file OK.

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

[global]

        workgroup = DAVISOFT

        netbios name = GENTOO_NYLE

        server string = Samba Server

        interfaces = lo, eth0, eth1, eth2

        bind interfaces only = Yes

        name resolve order = wins lmhosts host bcast

        socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192

        hostname lookups = Yes

        printcap name = cups

        dns proxy = No

        wins support = Yes

        guest ok = Yes

        hosts allow = localhost, 192.168.10.0/24, 192.168.1.0

        hosts deny = All

        printing = cups

        cups options = "raw"

        print command = lpr -P'%p' %s; rm %s

        lppause command = lp -i '%p-%j' -H hold

        lpresume command = lp -i '%p-%j' -H resume

        queuepause command = disable '%p'

        queueresume command = enable '%p'

        use client driver = Yes

[print$]

        comment = Printer Drivers

        path = /etc/samba/printer # this path holds the driver structure

        write list = username,root

[printers]

        comment = All Printers

        path = /etc/samba/smbprint

        printer admin = printer_username, root, 1.*

        guest only = Yes

        printable = Yes

        browseable = No

[HP-4L]

        comment = HP-4L on Windows Server

        path = /etc/samba/smbprint

        create mask = 0777

        guest only = Yes

        printable = Yes

[install_cds]

        comment = Server Connect = CDs

        path = /var/shared-files/install_cds

        valid users = administrator, nyle, root

        read only = No

        create mask = 0777

        guest ok = No

[bids_plans]

        comment = Downloaded Plan Files for Bidding

        path = /var/shared-files/bids_plans

        valid users = administrator, nyle, root

        read only = No

        create mask = 0765

        guest ok = No

[print_howto]

        comment = Printing Setup Howto Files

        path = /var/shared-files/print_howto

        valid users = administrator, nyle, root

        read only = No

        create mask = 0777

        guest ok = No

[school]

        comment = Folder for North Lake College Unix Classes

        path = /var/shared-files/school

        valid users = administrator, nyle, root

        read only = No

        create mask = 0777

        guest ok = No
```

Using this output I eliminated all the guest strings from the non-global section and re-ran.

What else do I need to change?

When I issue the samba start command:

```
localhost ~ # /etc/init.d/samba start

 * samba -> start: smbd ...

 * ERROR:  samba caught an interrupt

```

It appears the smbd section executes OK, but the nmbd section never runs.  I'm the one manually entering the ^C to force the interrupt as nothing happens past the start smbd.  Thinking about this does this means smb.conf is truly OK?

I did recently have disk-full errors so have to change all the DIST and PORTAGE directories.  See thread  *Quote:*   

> https://forums.gentoo.org/viewtopic-t-559932-highlight-.html

 Is this problem related to this?  Is the nmbd section looking for a file it can no longer find?  If so what file is it and where to I go to correct this problem?

Thanks!

OMRLast edited by OldManRiver on Wed Jun 13, 2007 1:01 am; edited 5 times in total

----------

## darkphader

rtfm

----------

## OldManRiver

 *darkphader wrote:*   

> rtfm

 

Dark,

Did you see my correction to the testparm entry?

After correcting the file I now have

```
localhost ~ # testparm

Load smb config files from /etc/samba/smb.conf

Processing section "[print$]"

Processing section "[printers]"

WARNING: The "Printer admin" option is deprecated

Processing section "[HP-4L]"

Processing section "[install_cds]"

Processing section "[bids_plans]"

Processing section "[print_howto]"

Processing section "[school]"

Loaded services file OK.

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions
```

I think this means I'm good, but need a feedback on the Warning message!

Thanks!

OMR

----------

## darkphader

 *OldManRiver wrote:*   

> Did you see my correction to the testparm entry?

 

Not until now.

1) Don't have a [printers] section and then define printers separately - [HP-4L].

2) It's probably not a good idea to re-share a share - again [HP-4L], if it's connected to the Windows box and the Windows box is it's print server then just print to it w/o using Samba. If the comment is just confusing me then see 1).

3) When using cups there is no need to define print commands - get rid of them (includes the queue... shit).

4) Simplify your smb.conf - unless you have an eth3 as well that you don't want Samba to listen on then skip all of the "interfaces=", "bind interfaces...".

5) Skip useless stuff like "hostname lookups" - it's expensive and you might not be running a DNS server anyway.

6) Again simplify, get rid of the "hosts allow", and "hosts deny"

7) Dump "socket options" as well.

8) If you're not pointing your clients to the WINS server then don't run one (usually you would want it to be the PDC as well.

Basically simplify, get rid of the BS - use the example smb.conf from the examples folder in the original Samba tarball as a starting point instead of Gentoo's example config. Got to samba.org and read the "official howto" and "by example" docs. Start with something that works and then tweak it.

Remember that today's Samba emulates a Windows NT 4.0 Server. In order to use it successfully it helps to be familiar with that environment.

Chris

----------

## OldManRiver

All,

Since nmbd is not starting correctly, I'm re-emerging SAMBA.

Thanks!

OMR

----------

## OldManRiver

All,

The re-emerge did not fix anything, still at the same point of frustration.

OMR

----------

## OldManRiver

All,

GNUtoo, on IRC told me to emerge strace so I did and ran it as follows:

```
strace /etc/init.d/samba start
```

Got errors but the terminal drop so lost the output and have not been able to reproduce it.  Afer re-emerging samba again got the error and hang point back at:

```
 * samba -> start: smbd ...

rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0

rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0

rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0

rt_sigaction(SIGINT, {0x807802c, [], 0}, {0x808730f, [], 0}, 8) = 0

waitpid(-1, 
```

So what does this means?  Am I looking for a file "rt_sigaction" or "sig_block"?

OMRLast edited by OldManRiver on Wed Jun 13, 2007 6:26 pm; edited 1 time in total

----------

## darkphader

 *OldManRiver wrote:*   

> localhost ~ # testparm
> 
> [global]
> 
>         workgroup = DAVISOFT
> ...

 

For one this config has some wrong paths based on Gentoo's normal setup. When you use another config as an example you need to adjust such things.

Try this as your whole smb.conf (edit it directly - forget about swat):

```
[global]

        workgroup = DAVISOFT

        netbios name = GENTOO_NYLE

        server string = Samba Server

        printcap name = cups

        guest ok = Yes

        printing = cups

        cups options = "raw"

        passdb backend = tdbsam

[print$]

        comment = Printer Drivers

        path = /var/lib/samba/printers

        write list = root

[printers]

        comment = All Printers

        path = /var/spool/samba

        guest ok = Yes

        printable = Yes

        browseable = No

        create mode = 0700
```

First, I got rid of all the cruft. Second I adjusted the paths of [print$] and [printers] to those that gentoo sets up. Third I suggest using the tdbsam passdb backend instead of smbpasswd (you will have to re-add your users), but you can skip that if you want to for now.

Suggest you also keep your other shares out for now. Add them, as well as other options and changes you think you need, later after everything starts up correctly. Always run "testparm" after any changes.

Chris

----------

## OldManRiver

Dark,

Thanks for the input!  File is now!

```
[global]

        workgroup = DAVISOFT

        netbios name = GENTOO_NYLE

        server string = Samba Server

        printcap name = cups

        guest ok = Yes

        printing = cups

        cups options = "raw"

   encrypt passwords = yes

#        passdb backend = tdbsam

   wins support = yes

   hostname lookups = yes

[print$]

        comment = Printer Drivers

        path = /var/lib/samba/printers

        write list = root

[printers]

        comment = All Printers

        path = /var/spool/samba

        guest ok = Yes

        printable = Yes

        browseable = No

        create mode = 0700
```

and Samba is up but with Windows hosts and shares are not resolving and mounting!

I was told I had to have the

```
   wins support = yes

   hostname lookups = yes
```

if I want hosts to resolve.

Any ideas on this?

Thanks!

OMR

----------

## darkphader

 *OldManRiver wrote:*   

> I was told I had to have the
> 
> ```
>    wins support = yes
> 
> ...

 

Trust me, you don't want "hostname lookups = yes", dump it.

Normally you run a WINS server when you have a NetBIOS domain and a PDC. I guess you could run one otherwise but it's not normally done AFAIK. You do need to point the clients to the WINS server or it wont do you any good, and how much good it will do w/o a PDC is probably debatable anyway.

I suggest you setup and use DNS instead as WINS will not be all that useful in a peer-to-peer configuration with "modern" clients (>=Win2k).

Chris

----------

## OldManRiver

 *darkphader wrote:*   

> Trust me, you don't want "hostname lookups = yes", dump it.
> 
> Normally you run a WINS server when you have a NetBIOS domain and a PDC.

 

Dark,

I want this box with SAMBA to be the WINS domain controller.

OMR

----------

## darkphader

 *OldManRiver wrote:*   

> I want this box with SAMBA to be the WINS domain controller.

 Then read the Samba howto and set it up as a PDC, run WINS, use DNS as well (every modern network needs that) and DHCP to configure the clients. You still don't want "hostname lookups = yes".

Chris

----------

## OldManRiver

Dark,

That is why I have all that crap in the smb.conf, because the HOWTO said so, including the one you say is forbidden.

Last round with Samba restart produced another error of:

```
"Unable to open printcap file cups for read!"
```

What now?

Also got some input from IRC to look at the host file which contains:

```
127.0.0.1   localhost

::1   localhost

10.1.10.19   Server

10.1.10.52   GenToo_Nyle

10.1.10.106   HP4L

10.1.10.152   TechBench

10.1.10.160   GenToo_Carter
```

which are the old defs for when we were on Time Warner.  Is there a way to script this so they auto propagate?

OMR

----------

## darkphader

 *OldManRiver wrote:*   

> That is why I have all that crap in the smb.conf, because the HOWTO said so, including the one you say is forbidden.

 

I have no clue what HOWTO you're reading. None of that junk is in the one at:

http://us3.samba.org/samba/docs/man/Samba-HOWTO-Collection/samba-pdc.html

nor at:

http://us3.samba.org/samba/docs/man/Samba-Guide/secure.html

Official Samba documentation whch I pointed you to in an earlier post.

Chris

----------

## OldManRiver

All,

I think I'm starting to understand at least some of the problem.  Since all IPs on my print server and all the Win machines change multiple times daily, these hard coded IPs will never work, so I need to find a way to either autofind the IPs and mount that way or run a script that regens the list here in the "/etc/hosts" file and restarts Samba and remount the Wins shares when run.

Please understand that the 3 monitored lines do not assign in the same IP ranges but instead they assign:

```
Connect 1 ==> 192.168.10.x

Connect 2 ==> 192.168.1.x

Connect 3 ==> 192.168.7.x
```

Any suggestions on this?

Thanks!

OMR

----------

## OldManRiver

All,

Some help from IRC told me to "emerge nmap" and run it, but I don't understand what to do with this command.

Further help said to run IFCONFIG to get root IP address then run the command as:

```
nmap -sP 192.168.1.0/24
```

With results of:

```
Starting Nmap 4.20 ( http://insecure.org ) at 2007-06-14 09:40 CDT

Host 192.168.1.1 appears to be up.

MAC Address: 00:16:B6:A8:84:17 (Cisco-Linksys)

Host 192.168.1.100 appears to be up.

MAC Address: 00:18:F3:A0:50:C0 (Asustek Computer)

Host 192.168.1.101 appears to be up.

MAC Address: 00:0C:F1:B1:8B:EA (Intel)

Host 192.168.1.102 appears to be up.

MAC Address: 00:14:2A:0E:CE:FC (Elitegroup Computer System Co.)

Host 192.168.1.103 appears to be up.

MAC Address: 00:14:BF:FC:28:79 (Cisco-Linksys)

Host 192.168.1.104 appears to be up.

MAC Address: 00:16:E6:85:17:CF (Giga-byte Technology Co.)

Host 192.168.1.105 appears to be up.

MAC Address: 00:D0:59:13:8B:46 (Ambit Microsystems)

Host 192.168.1.107 appears to be up.

MAC Address: 00:0E:A6:4E:1D:9A (Asustek Computer)

Host 192.168.1.108 appears to be up.

Nmap finished: 256 IP addresses (9 hosts up) scanned in 5.866 seconds
```

This can be captured in a file to script against to bring up my 

Wins Shares, but checking on some other thing first.  Looks like my printer is the second LinkSys address with the router as the first.  At least now I can write a script to mount the print correctly.  I think this is great progress!

Thnaks!

OMR

----------

## darkphader

 *OldManRiver wrote:*   

> Since all IPs on my print server and all the Win machines change multiple times daily, these hard coded IPs will never work, so I need to find a way to either autofind the IPs and mount that way or run a script that regens the list here in the "/etc/hosts" file and restarts Samba and remount the Wins shares when run.

 

I alluded to the proper solution in my post back on Sat Apr 21, 2007 at 2:47 pm. Run your own DNS and DHCP servers for the internal network. A "real" DHCP server can reserve IP addresses based on the MAC address so the systems will always receive the same IP address even thought they are "dynamically" assigned. The DNS server will avoid the messy hosts file issues, always having to keep them mantained with a correct updated copy on every system.

The manual way is only usable with about 5 systems or less (I think it's a hassle for more then 3) and requires that you use static IP addressing and properly complete hosts and lmhosts files and keep an updated, correct copy on every system (including the server). A real pain IMO.

Chris

----------

## OldManRiver

Dark,

Since I'm too noob, some of the things you say leave me clueless, so please give more detail, till I figure out what you are trying to tell me!

In particular, to set the DNS, etc. right what services and files am I looking and and what should they look like, etc.

Right now I've been working on some scripts which are:

```
#! /bin/bash

rm /etc/nmap.txt /etc/nmap.txt.new /etc/nmap.shares

$uid = "myadmin"

$pwd = "mypwd"

nmap -sP 192.168.1.0/24 | grep [Hh]ost > /etc/nmap.txt

awk -f /var/shared-files/print_howto/clean_nmap.awk /etc/nmap.txt > /etc/nmap.txt.new

chmod 770 "/etc/nmap.txt.new"

fp=open "/etc/nmap.txt.new" "r"

```

As far as I've got here.  Going to write a "while" loop and use smbclient with the IP address and name to find the Win Shares.

and"

```
#####################################################

#                                                   #

# Name:     clean_nmap.awk                          #

# Purpose:  Clean the /etc/nmap.txt file so only    #

#           the name and IP address remain.         #

# Author:   Nyle Davis      Create Date: 06-14-07   #

# Modified:                                         #

# Command:  awk -f clear_nmap.awk /etc/nmap.txt     #

#                                                   #

#####################################################

BEGIN {

#  system ("clear")

}

$1=="Host" && $3!="appears" {

   ilen = length($3)

   ipad = substr($3,2,ilen-2)

   printf "%-20s\t%-8s\n", ipad, $2

}

END {

}
```

Any feedback here is good!

Thanks!

OMR

----------

## darkphader

 *OldManRiver wrote:*   

> Since I'm too noob, some of the things you say leave me clueless, so please give more detail, till I figure out what you are trying to tell me!
> 
> In particular, to set the DNS, etc. right what services and files am I looking and and what should they look like, etc.

 

Apparently you still haven't read the docs I pointed you to.

Sorry, can't do all of your work for you. I'm leaving this thread.

Chris

----------

## OldManRiver

Dark,

 *darkphader wrote:*   

> Apparently you still haven't read the docs I pointed you to.

 

I did but as noob, some is criptic and some just don't understand yet, plus that was days ago and I forgot all of it.

Sorry!

Looking back for your post to see what I missed, and try again!

Thanks! OMR

----------

## OldManRiver

Dark,

This was your post on the day you specified!  What am I missing here?

 *darkphader wrote:*   

>  *jstead1 wrote:*   It doesn't need a statuc IP.  I know the router has or can be given a host name.
> 
> <snip>
> 
> When you are asked for the URI, use the http://hostname:631/printers/queue syntax. "  So you don't need a static IP, you need a host name. 
> ...

 I tried the "http://hostname:631/printers/queue" syntax and still get nothing from the printer.  Did I miss something or overlook something here?

Thanks!

OMR

----------

## OldManRiver

Dark,

Reading back over you input I found this HOWTO page {http://gentoo-wiki.com/HOWTO_Add_a_gentoo_server_to_a_windows_network} and maybe I got it now, but have a Q on one line in the smb.conf file:

```
#        password server = YOUR PDC
```

which I commented out, because I do not know what I'm supposed to be entering here.  Can you help?

File now contains:

```
[global]

#-------[ Net Hood Settings ]

        workgroup = DAVISOFT

        netbios name = GENTOO_NYLE

        server string = Samba Server

        socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192 IPTOS_LOWDELAY

   wins support = yes

   hostname lookups = yes

   name resolve order = wins lmhosts host bcast

#-------[ Log Level ]

        log level = 2

#-------[ Server Role Settings ]

        guest ok = Yes

        security = DOMAIN

#        password server = YOUR PDC

        encrypt passwords = true

#-------[NT ACL Compatability]

        nt acl support = true

        create mode = 0644

        directory mode = 0755

#-------[ Winbind communication ]

        idmap uid = 15000-20000

        idmap gid = 15000-20000

        winbind use default domain = Yes

#-------[ Printserver information ]

        printcap name = cups

        cups options = "raw"

        disable spoolss = yes

        show add printer wizard = no

        printing = cups

        security mask = 0777

#-------[ All Printer information ]

[print$]

        comment = Printer Drivers

        path = /var/lib/samba/printers

        write list = root

[printers]

        comment = All Printers

        path = /var/spool/samba

        printable = Yes

        browseable = No

        create mode = 0700

[HP-4L]

   comment = HP-4L on Windows Server

   writable = no

   browseable = yes

   printable = yes

   public = yes

   create mask = 0777

   # create mode = 0700

   path = /etc/samba/smbprint

#-------[ Shares ]

[install_cds]

   comment = Server Connect = CDs

   path = /var/shared-files/install_cds

   browseable = yes

   writable = yes

   valid users = all my users

   public = no

   printable = no

        inherit permissions = Yes

        inherit acls = yes

        create mask = 0644

        guest ok = no

        security mask = 0777

[bids_plans]

   comment = Downloaded Plan Files for Bidding

   path = /var/shared-files/bids_plans

   browseable = yes

   writable = yes

   valid users = all my users

   public = no

   printable = no

        inherit permissions = Yes

        inherit acls = yes

        create mask = 0644

        guest ok = no

        security mask = 0777

[print_howto]

   comment = Printing Setup Howto Files

   path = /var/shared-files/print_howto

   browseable = yes

   writable = yes

   valid users = all my users

   public = no

   printable = no

        inherit permissions = Yes

        inherit acls = yes

        create mask = 0644

        guest ok = no

        security mask = 0777

[school]

   comment = Folder for North Lake College Unix Classes

   path = /var/shared-files/school

   browseable = yes

   writable = yes

   valid users = all my users

   public = no

   printable = no

        inherit permissions = Yes

        inherit acls = yes

        create mask = 0644

        guest ok = no

        security mask = 0777
```

I found this when I stumbled on the the comment you made about the nsswitch.conf file, which had not registered with me first time through.

My nsswitch.conf file contains:

```
# /etc/nsswitch.conf:

passwd:         compat winbind

group:          compat winbind

shadow:         compat

hosts:       files dns wins

networks:    files dns 

services:    db files

protocols:   db files

rpc:         db files

ethers:      db files

netmasks:    files

netgroup:    files

bootparams:  files

automount:   files

aliases:     files

netgroup:       nis
```

Now when I restart Samba I get:

```
localhost print_howto # /etc/init.d/samba restart

 * samba -> start: smbd ...                                                                [ ok ]

 * samba -> start: nmbd ...                                                                [ !! ]

 * Error: stopping services (see system logs at /var/log/samba/* )

 * samba -> stop: smbd ...                                                                 [ ok ]

 * samba -> stop: nmbd ...                                                                 [ !! ]

log.smbd

[2007/06/15 10:05:33, 0] smbd/server.c:main(847)

  smbd version 3.0.24 started.

  Copyright Andrew Tridgell and the Samba Team 1992-2006

[2007/06/15 10:05:33, 2] param/loadparm.c:do_section(3704)

  Processing section "[print$]"

[2007/06/15 10:05:33, 2] param/loadparm.c:do_section(3704)

  Processing section "[printers]"

[2007/06/15 10:05:33, 2] param/loadparm.c:do_section(3704)

  Processing section "[HP-4L]"

[2007/06/15 10:05:33, 2] param/loadparm.c:do_section(3704)

  Processing section "[install_cds]"

[2007/06/15 10:05:33, 2] param/loadparm.c:do_section(3704)

  Processing section "[bids_plans]"

[2007/06/15 10:05:33, 2] param/loadparm.c:do_section(3704)

  Processing section "[print_howto]"

[2007/06/15 10:05:33, 2] param/loadparm.c:do_section(3704)

  Processing section "[school]"

[2007/06/15 10:05:33, 0] printing/pcap.c:pcap_cache_reload(159)

  Unable to open printcap file cups for read!

[2007/06/15 10:05:33, 0] printing/pcap.c:pcap_cache_reload(159)

  Unable to open printcap file cups for read!

[2007/06/15 10:05:33, 2] lib/interface.c:add_interface(81)

  added interface ip=192.168.1.108 bcast=192.168.1.255 nmask=255.255.255.0

[2007/06/15 10:05:33, 2] lib/tallocmsg.c:register_msg_pool_usage(61)

  Registered MSG_REQ_POOL_USAGE

[2007/06/15 10:05:33, 2] lib/dmallocmsg.c:register_dmalloc_msgs(71)

  Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED

[2007/06/15 10:05:33, 2] smbd/server.c:open_sockets_smbd(384)

  waiting for a connection

log.nmbd

BLANK
```

I'm assuming the error is because I don't have this PDC statement right?

Thanks!

OMR

----------

## Carter McArthur

All/Dark,

Been involved in this with OMR and following along.  He and I, since we are on the same network, decided my computer will be the PDC, so posting my smb.conf to make sure, I'm not screwing myself.  Could use some help here as we need to resolve our problem.  We feel we are close, but still no potato.

smb.conf

```
[global]

#-------[ Net Hood Settings ]

     workgroup = Davisoft

   netbios name = Gentoo_Carter

   server string = Samba Server

        # server string = PDC [on Gentoo :: Samba server %v]

        socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192 IPTOS_LOWDELAY

   wins support = yes

#   hostname lookups = yes

   name resolve order = wins lmhosts host bcast

#   hosts allow = 192.168.4.0/24 127.0.0.0/8

   encrypt passwords = yes

   interfaces = eth0

   bind interfaces only = yes

#-------[ Log Level ]

        log level = 2

   log file = /var/log/samba/log.%m

   max log size = 150

#-------[ Server Role Settings ]

        guest ok = Yes

        security = DOMAIN

   os level = 65

        password server = Davisoft

        encrypt passwords = true

   domain master = yes

   preferred master = yes

   domain logons = yes

   logon script = login.bat  OR %U.bat

   logon path = \\%L\profiles\%U

   logon drive = H:

   logon home = \\%L\%U\.9xprofile

   time server = yes

   smb passwd file = /var/lib/samba/private/smbpasswd

   dns proxy = no 

#-------[NT ACL Compatability]

        nt acl support = true

        create mode = 0644

        directory mode = 0755

#-------[ Winbind communication ]

        idmap uid = 15000-20000

        idmap gid = 15000-20000

        winbind use default domain = Yes

#-------[ User Profiles ]

[profiles]

   path = /var/lib/samba/profiles

   browseable = no

   writeable = yes

   default case = lower

          unix charset = ISO8859-1

   preserve case = no

   short preserve case = no

   case sensitive = no

   hide files = /desktop.ini/ntuser.ini/NTUSER.*/

   write list = @smbusers @root

   create mask = 0600

   directory mask = 0700

   csc policy = disable

   add user script = /usr/sbin/useradd -m %u

   delete user script = /usr/sbin/userdel -r %u

   add group script = /usr/sbin/groupadd %g

   delete group script = /usr/sbin/groupdel %g

   add user to group script = /usr/sbin/usermod -G %g %u

   add machine script = /usr/sbin/useradd -s /bin/false -d /dev/null %u

   passwd program = /usr/bin/passwd %u

   passwd chat = "*New password:*" %n\r "*New password (again):*" %n\r \ "*Password changed*"

#   smbpasswd -a your_user

   smbpasswd -a root

#-------[ User Logins ]

[netlogon]

    path = /var/lib/samba/netlogon

    guest ok = no

    read only = yes

    browseable = no

#-------[ User Default Dir ]

[homes]

    path = /home/%U

    browseable = no

    valid users = %S

    read only = no

    guest ok = no

    inherit permissions = yes

#-------[ Public Defaults ]

[public]

    comment = Public Stuff

    path = /public

    public = yes

    read only = yes

    browseable = yes

    write list = @users

#-------[ Printserver information ]

# [printing]

   encrypt passwords = yes

   lock directory = /usr/local/samba/var/lock

   interfaces = eth0             # the interface to the local network

   security = user

        printcap name = cups

        cups options = "raw"

        disable spoolss = yes

   browseable = yes

   load printers = yes

   use client driver = yes

        show add printer wizard = yes

        printing = cups

        security mask = 0777

#-------[ All Printer information ]

[print$]

   guest ok = no

   browseable = yes

   read only = yes

        comment = Printer Drivers

        path = /var/lib/samba/printers

   #  write list = username,root 

        write list = root

[printers]

   comment = All Printers

   path = /var/spool/samba

   public = yes

   # writable = no

   printable = yes

   #  printer admin = printer_username,root 

   printer admin = root, 

        create mode = 0700

   create mask = 0600

   guest ok = Yes

   printable = Yes

   printer name = HP4L

   use client driver = Yes

   browseable = No

[HP4L]

   comment = Networked HP4L Printer

   path = /var/spool/samba

   # path = //sca18563/p1

   public = yes

   guest ok = yes

   printer admin = root

   printable = Yes

   guest ok = Yes

#-------[ Shares ]

[carter]

   comment = Carter's Folder

   path = /usr/share/carter

   guest = ok

   browseable = yes

   writeable =yes

   valid users = administrator nyle root ironfoot

   public = no

   printable = no

        inherit permissions = Yes

        inherit acls = yes

        create mask = 0644

        guest ok = no

        security mask = 0777

[exchange]

   comment = TechBench

   path = /usr/share/exchange

        guest = ok

        browseable = yes

        writeable =yes

        valid users = administrator nyle root ironfoot

        public = no

        printable = no

        inherit permissions = Yes

        inherit acls = yes

        create mask = 0644

        guest ok = no

        security mask = 0777

[teststuff]

        comment = TechBench  

        path = /usr/share/teststuff

        guest = ok

        browseable = yes

        writeable =yes

        valid users = administrator nyle root ironfoot

        public = no

        printable = no

        inherit permissions = Yes

        inherit acls = yes

        create mask = 0644

        guest ok = no

        security mask = 0777
```

Thanks All!

Carter/IronFoot

----------

## OldManRiver

All,

Carter/Ironfoot has most of the PDC configured, I think we still have some tweaking on this at the user creation/dfinition level, but think the rest is running OI.  At least SAMBA is up.

So now I guess I still need to work out why I'm getting errors.

OMR

----------

## OldManRiver

All,

Got Samba back up!  Help from IRC was to run "ps aux" which showed 3 sessions of nmbd running.  Killed them and Samba restarted just fine.  Now back to the host resolution problem and ultimately the printing!

When I run "nmap" I get:

```
Starting Nmap 4.20 ( http://insecure.org ) at 2007-06-18 16:20 CDT

Host 192.168.1.1 appears to be up.

MAC Address: 00:16:B6:A8:84:17 (Cisco-Linksys)

Host 192.168.1.101 appears to be up.

MAC Address: 00:0C:F1:B1:8B:EA (Intel)

Host Server (192.168.1.102) appears to be up.

MAC Address: 00:14:2A:0E:CE:FC (Elitegroup Computer System Co.)

Host HP4L (192.168.1.103) appears to be up.

MAC Address: 00:14:BF:FC:28:79 (Cisco-Linksys)

Host TechBench (192.168.1.104) appears to be up.

MAC Address: 00:16:6F:18:33:0E (Intel)

Host 192.168.1.107 appears to be up.

MAC Address: 00:0E:A6:4E:1D:9A (Asustek Computer)

Host GenToo_Nyle (192.168.1.108) appears to be up.

Host 192.168.1.110 appears to be up.

MAC Address: 00:40:CA:A6:83:68 (First Internat'l Computer)

Nmap finished: 256 IP addresses (8 hosts up) scanned in 5.639 seconds
```

As you can see the printer shows as 192.168.1.103, but CUPS/IIP does not find it.

I defined 2 printer sessions (HP4L and HP4LJ) one with http://192.168.1.103:631 the other with ipp://192.168.1.103 and neither work.  I've also tried the HP JetDirect settings and nothing there either.  Since my printer server has 3 ports P1-P3, I've tried the config both with and without the port def and still nothing.

Found nyself in the middle of the HOWTO at: http://gentoo-wiki.com/HOWTO_Add_a_gentoo_server_to_a_windows_network at the point where I enter the commands:

```
wbinfo -u

wbinfo -g

getent passwd

getent group
```

Getting these errors:

```
localhost etc # wbinfo -u

Error looking up domain users

localhost etc # wbinfo -g

Error looking up domain groups
```

We setup PDC on another computer and thought it was right!

Any suggestions on what to do now?

Thanks!

OMR

----------

## OldManRiver

All,

 *Quote:*   

> We setup PDC on another computer and thought it was right!

 Man am I asleep or what?  Just noticed the PDC is not in the listing.  It is GenToo_Carter and I know you don't see it either.  Now I have to see why not!  Be back after I figure that out!

OMR

----------

## OldManRiver

Dark,

I put the file on pastebin at:

http://pastebin.ca/580502

I'm not being lazy.  I just copied this whole thing verbatum from a HOWTO, except for my shares, and don't have enough knowledge yet to know what command or parm effects what process, etc.

Had already posted before getting your feedback, because /dev/hdb2 blew and I had to get help from IRC to get fsck to run and fix the /var partition.  I'm deleting the printer share and adding it in the printers.conf file, which I found I actually already had defined.  Just not sure if that def is right, maybe a pastebin on that is in order?

I could sure use your help if you quickly commented out the lines you think are whacking me and reposted on pastebin.

Thanks!

OMR

----------

## OldManRiver

All,

Here is the latest file and errors from restart:

```
[global]

#-------[ Net Hood Settings ]

        workgroup = workgroup

        netbios name = NB_Name

        server string = Samba Server

        socket options = TCP_NODELAY SO_SNDBUF=8192 SO_RCVBUF=8192 IPTOS_LOWDELAY

   wins support = yes

   hostname lookups = yes

   name resolve order = wins lmhosts host bcast

#-------[ Log Level ]

        log level = 2

#-------[ Server Role Settings ]

        guest ok = Yes

        security = user

#        security = DOMAIN

#        password server = YOUR PDC

#        encrypt passwords = true

#-------[NT ACL Compatability]

        nt acl support = true

        create mode = 0644

        directory mode = 0755

#-------[ Winbind communication ]

        idmap uid = 15000-20000

        idmap gid = 15000-20000

        winbind use default domain = Yes

#-------[ Printserver information ]

        printcap name = cups

        cups options = "raw"

        disable spoolss = yes

        show add printer wizard = yes

        printing = cups

        security mask = 0777

#-------[ Shares ]

[install_cds]

   comment = Server Connect = CDs

   path = /var/shared-files/install_cds

   browseable = yes

   writable = yes

   valid users = administrator nyle root

   public = no

   printable = no

        inherit permissions = Yes

        inherit acls = yes

        create mask = 0644

        guest ok = no

        security mask = 0777

[bids_plans]

   comment = Downloaded Plan Files for Bidding

   path = /var/shared-files/bids_plans

   browseable = yes

   writable = yes

   valid users = administrator nyle root

   public = no

   printable = no

        inherit permissions = Yes

        inherit acls = yes

        create mask = 0644

        guest ok = no

        security mask = 0777

[print_howto]

   comment = Printing Setup Howto Files

   path = /var/shared-files/print_howto

   browseable = yes

   writable = yes

   valid users = administrator nyle root

   public = no

   printable = no

        inherit permissions = Yes

        inherit acls = yes

        create mask = 0644

        guest ok = no

        security mask = 0777

[school]

   comment = Folder for North Lake College Unix Classes

   path = /var/shared-files/school

   browseable = yes

   writable = yes

   valid users = administrator nyle root

   public = no

   printable = no

        inherit permissions = Yes

        inherit acls = yes

        create mask = 0644

        guest ok = no

        security mask = 0777
```

Restart gives these errors:

```
[2007/06/20 22:30:42, 0] nmbd/nmbd_become_lmb.c:become_local_master_stage2(396)

  *****

  

  Samba name server GENTOO_NYLE is now a local master browser for workgroup DAVISOFT on subnet 192.168.1.108

  

  *****

[2007/06/20 22:30:42, 0] nmbd/nmbd_browsesync.c:find_domain_master_name_query_fail(351)

  find_domain_master_name_query_fail:

  Unable to find the Domain Master Browser name DAVISOFT<1b> for the workgroup DAVISOFT.

  Unable to sync browse lists in this workgroup.

[2007/06/20 22:33:50, 0] nmbd/nmbd.c:terminate(58)

  Got SIGTERM: going down...
```

We disignated another GenToo box as PDC, thinking we might have PDC def errors on it, causing this.

Any thoughts?

Thanks!

OMR

----------

## OldManRiver

All,

After all the trashing about to find a solutions, found this URI where someone makes it work on Ubuntu (We switched to our PS110 also, but still not working here), even after following this procedure:

http://ubuntuforums.org/archive/index.php/t-225387.html

There is also a related posting at:

http://forum1.netgear.com/showthread.php?t=7489&highlight=linux

What is missing in Gentoo that is present in Ubuntu?

Thanks!

OMR

----------

## Carter McArthur

All,

We (OldManRiver and I) finally got CUPS working here.  Will post in seperate thread so others can find the solution without wading through this mess.

Still need help on our Samba though!

Thanks!

IronFoot

----------

## OldManRiver

All,

Got a partial fix, posted HOWTO at:

https://forums.gentoo.org/viewtopic-p-4121586.html#4121586

The part that was killing us is the .ppd part, which none of the CUPS install guides we read early on talked about.

Anyway still trying to resolve our problems with SAMBA and host resolutions.

OMR

----------

