Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've installed a Samba server using Ubuntu Server as the OS. When the computer starts, smbd and nmbd both start correctly. However, if I go to a client and type:

$ smbclient -L feynman

I get:

Enter chris's password: 
Connection to feynman failed (Error NT_STATUS_UNSUCCESSFUL)

If I then go to the server and restart the smbd service, it works correctly.

I have the server configured to share a USB drive; is it possible that it's starting before the USB drive is available?

I don't see anything interesting in smbd.log.

share|improve this question

1 Answer 1

You can check Samba binding to your network interfaces with

root@server:~# lsof -ni:139
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
smbd    2265 root   29u  IPv4  13788      0t0  TCP 127.0.0.1:netbios-ssn (LISTEN)
smbd    2265 root   31u  IPv6  13790      0t0  TCP [::1]:netbios-ssn (LISTEN)

Here it's binding only to the loopback interface and doing a smbclient -L 127.0.0.1 will work.

Depending on your smb.conf (interfaces, and bind interfaces only) Samba will bind only to the loopback interface if you use DHCP and will bind OK after you restart it.

This is happening because upstart doesn't wait for all network interfaces to be up, see http://askubuntu.com/a/349142/332223

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.