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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Samba 'smbd' daemon won't run!

Status
Not open for further replies.

eeb

Technical User
Sep 12, 2001
12
GB
I have managed to get Samba working between Solaris 2.6 and my Windows 2000 PC. I can see the shares ok on my PC and if I add a share in my smb.conf the PC registers this. However my smbd is not running and refuses to run. I am trying to run it along with the nmbd daemon (which works)from a simple script which I then execute. When I try and run 'smbclient -L samba_server' I get the following message:

Added interface ip=132.155.104.7 bcast=132.155.255.255 nmask=255.255.0.0
session request to TRENT failed
session request to *SMBSERVER failed

When I looked at the $SAMBA/var/log.smb these are the last few lines...

[2001/10/29 16:20:34, 1] smbd/server.c:main(614)
smbd version 2.0.0 started.
Copyright Andrew Tridgell 1992-1998
[2001/10/29 16:20:34, 1] smbd/files.c:file_init(219)
file_init: Information only: requested 10000 open files, 1014 are available.
[2001/10/29 16:20:34, 0] smbd/server.c:main(669)
standard input is not a socket, assuming -D option
[2001/10/29 16:20:34, 0] lib/util_sock.c:eek:pen_socket_in(663)
bind failed on port 139 socket_addr=0.0.0.0 (Address already in use)

I am not very up on how it all works but I am sure that even though things seem to be working, I should still have the smbd daemon running!

If its any help, I am using 'security = domain' and have assigned the Windows PDC as the 'password server'

What is going wrong?

Emma


 
how are you starting smbd and nmbd ?

are you starting them in inetd.conf and services, or as daemons from the command line: (/opt/samba/bin/smbd -D ?)

we start them here from inetd, but then we do like to do these things the hard way.

also did you download samba of the web and compile or download as a package ... (and which version are you using ?)

Jon
 
Right, let me try and answer your questions. I was originally trying to start it using entries for netbios-ssn and netbios-ns in inetd.conf and services because I would rather use that method, and it worked ok for a while, but then the smbd daemon stopped and so I commented out the inetd.conf and services entries and tried to run it using a simple script with the following lines.

/usr/local/samba/bin/smbd -D
/usr/local/samba/bin/nmbd -D

To be honest though, it might sound like I kind of know what I am doing but I don't really and therefore I cannot remember exactly what I have tried and what I haven't and what order I tried stuff. This isn't very helpful I know but if you can tell me exactly what entries you have in your /etc/services and /etc/inetd.conf files and if there is anything apart from that I have to do then I would be very grateful.
By the way, I have just noticed that under my $SAMBA/var/locks dir there is a file called smbd.pid which contains a PID number. When doing a 'ps -ef | grep smbd', there is definitely no smbd running. What does this file mean?

Thanks jad!
 
a while back i created a script install for new PC's, i included this text with it ... (this is for working with Solaris 8 with the software companion CD with samba, just change the paths)

---------------------------------------------------------------------------------

# -- for a Solaris 8 System with the extra Samba package installed in
# -- the sfw directory:
# -- add the following 7 lines to /etc/inetd.conf:
# Samba Server Software.
netbios-ssn stream tcp nowait root /opt/sfw/bin/smbd smbd
netbios-ns dgram udp wait root /opt/sfw/bin/nmbd nmbd
#
#
# Swat Daemon
swat stream tcp nowait.400 root /opt/sfw/bin/swat swat

# -- add the following line to /etc/services:
swat 901/tcp # Samba Web Server.

---------------------------------------------------------------------------------

the PID file shows the currently running pid, if you run via inetd this file makes no sense ... :)

don't worry about it, it will overwrite it anyway ...

which version of samba are you using, do you have swat incorporated in it?

is your machine directly on the internet? (if so then you will need to ipfilter it, or configure samba with specific addresses and interfaces.)
 
ok, This is what I did...killed the nmbd daemon, added the lines for netbios-ssn and netbios-ns to the /etc/inetd.conf file and added swat to the /etc/services file. When I then stopped and started the inetd daemon I got a message in /var/adm/messages saying netbios...blah..unknown service, so then I added the following lines to /etc/services

netbios-ssn 139/tcp
netbios-ns 137/udp

I then stopped and started the inetd daemon again and the unknown service messaged didn't appear. What do I do next? At the moment I cannot see my samba server in Windows Explorer at all, let alone my shares!! Should I try and start the daemons? Sorry for being a div X-).

oh yeah here's the information you asked for, I downloaded samba 2.0.0 as a package and am running it on Solaris 2.6.

thanks lots again.

Em
 
don't start the daemons manually, it seems to confuse inetd ... and then it won't start properly till you reboot (or so it seems to me, impatient as i am sometimes)

ok ... i you set up swat then access the machine on port 901 from a web browser ...

this will allow you to set up things like the machine name, it's workgroup, it's shares and a whole load of other junk ... the defaut samba file (if it installed with it) is full of junk.

yeah sorry about the services stuff, Solaris 7 and 8 have those lines.

jon
 
Ok, It's all working now! Thank you for all your help! I don't know why I couldn't see my samba server from my PC Windows Explorer before but when I added my PC's IP address to the /etc/hosts file on UNIX and then rebooted my PC I could see the samba server and all my shares. And on top of that BOTH samba daemons are running for once!!! I think at some point I had inetd trying to run the daemons as well as running them form the command line! oops. I have rebooted the server and now it is all working well (apart from SWAT). I am using the smb.conf that I wrote manually and it works fine. I tried to access swat but it comes up with this error:

Samba is configured to deny access from this client
Check your "hosts allow" and "hosts deny" options in smb.conf

I have made sure of placing the samba server IP address against the 'hosts allow' keyword in smb.conf but still I can't access SWAT. I don't really mind though as everything else is working! :-D

Thanks again jad.
 
delete the line with hosts allow and hosts deny, and any kind of 'interfaces' and bind interfaces only

if you don't have lines in your smb.conf file that it can look for, it just uses the defaults ... if you use swat it cleans up your file real neat and tidy ... if you want that ... but don't edit it with 'vi' it screws your terminal up for some reason.

you could always run a 'testparm' on your machine and check from the output what it reckons it allows ...

jon.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top