Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Samba not showing server in network neighborhood.

Status
Not open for further replies.

jimktrains

IS-IT--Management
Jan 19, 2007
50
US
I've installed Samba 3.0.14 on SCO unix 5.0.6 and I am able to map drives on Win 2000, XP, and Vista. But now I need to add a printer that is installed on the unix system. When I try browsing the Network neighborhood on the Win 2000 machine, the unix server does not show. I have searched for some solution and saw a lot of things relating to nmbd but it seems they were all linux related and I can't find anything with nmbd in this Samba. I've tried various settings in the smb.conf file but nothing helped.

Any help is much appreciated.
 
The simplest thing that comes to mind... is your SAMBA server defined as Browseable in the configuration?

Annihilannic.
 
Yes, it is browseable. First off, this is my first experience with Samba so please bare with me. I don't know exactly what I did, but now the server does show in the Network Neighborhood on my Win 2000 PC. I remember now, I had to manually start nmbd using the -D option. What would be the best place to put this so it starts when rebooting?

My intention was to set up printers that are attached to the unix machine that is showing in Network Neighborhood. I can see them now, but they don't print. I send a print job, the job shows if I double click the printer in Network Neighborhood, and eventually goes away. But nothing prints. The printer does print from unix. I added the following to smb.conf

print command = echo "Print %s on %p" >> /tmp/printlog

but I get no /tmp/printlog file after attempting to print.

I have the printers manually set as such.
[PR1]
comment = "Genicom 930"
path = /usr/spool/lp/temp
browseable = yes
guest ok = yes
writable = no
printable = yes
use client driver = yes
printing = SYSV
print command = /usr/bin/lp -d%p -s %s; rm %s


 
SOLUTION:

To get the servers in Network Neighborhood, I had to start nmbd which I found in /usr/sbin and used the -D option

/usr/sbin/nmbd -D

In /etc/rc2.d/S99smbd I added to the start() section
/usr/sbin/nmbd -D

and in the stop() section I added
killproc nmbd

This way nmbd starts and stops when bsmbd does.
I also created three scripts to facilitate starting, stopping and restarting samba. They are smbstart, smbstop, and smbrestart. For example, smbstart has

/etc/rc2.d/S99smbd start
echo Samba Services started.

I put them in /usr/bin and made them executable. So I just type smbstart to start Samba. Mostly I've used smbrestart.

My printing problem was my path did not have permission to write temp files. So I changed it to /tmp and made sure /tmp had rwx across all (chmod 777 /tmp). I am sure any directory would work as long as permissions allow all users to write to it.

My print command for the HP laserjet in smb.conf is

print command = /usr/bin/lp -d%p -R -o raw -s %s

where %p will be the printer name, -R tells the unix lp command to delete the file when done printing, -o raw tells the printer to print the raw data, don't use the unix print driver as Windows already does. The -s supresses messages and %s will be the filename.

The print command for a pinfed printer is the same but without the -o raw option.

Thanks to Annihilannic for your response and anyone else who was taking their time to look into this for me. Hopefully, someone else will find my solution useful. Of course, any additional tip would be much appreciated.

As of now, everything I need to do works so I'm not changing anything unless I need to. Already made a copy of smb.conf just in case.

Jim, much happier today.
 
Nice for you to post the solutions to your problems.

I'd opt to change the /tmp permissions back to what they were. The O/S can be a bit picky about that directory. You can create a sub-directory under /tmp and use that for your Samba needs. Create a directory such as:
/tmp/samba/
and change your samba printer configuration command to this:
print command = echo "Print %s on %p" >> /tmp/samba/printlog
You can set the permissions of /tmp/samba to be 777.



"Proof that there is intelligent life in Oregon. Well, Life anyway.
 
Thanks motoslide. I was just happy to get it working and I wasn't really giving that much thought. I changed it as you suggested and it is still working.

I like to post the solution if I come across it because I hate looking at threads that just end and you don't know if it was solved or not. I came across one with SOLVED in the heading but no solution was posted.

Thanks for the advice on changing the directory.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top