Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have Ubuntu Intrepid with Samba installed on my machine. I have a basic configuration file included below.

When I try to invoke

smbclient -L localhost

I get the error:


This also happens when trying to invoke smbpasswd.

What are the possible causes of this error?

When I run both:

iptables -L
iptables -t nat -L

They are both empty.

Here is my config file (Running testparm reports that it's ok):

   workgroup = MSHOME
   server string = %h server (Samba, Ubuntu)
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   encrypt passwords = true
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
   usershare allow guests = yes
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
share|improve this question

I don't see an interface definition. I think your issue is that the service simply isn't bound to the loopback address, so when you connect, you're rejected.

Try adding this to your [global] section of your smb.conf file:

interfaces = ${your-ip-address}/{your-subnet-in-dotted-quad}
share|improve this answer
doesn't SAMBA bind to all interfaces by default? – Mr. Shiny and New 安宇 Jun 22 '09 at 12:33
I'm not sure what the default behaviour is, but whether it is listening or not can be confirmed using lsof -ni:137 Probably as root. I'd also check to see whether SELinux was enabled -- check your system logs (/var/log/audit/* on RH systems) to see if that is denying your connection. – jmtd Jun 29 '09 at 13:12
I tried adding: interfaces = eth0 and that didn't work. I've commented out hosts allow, or set it to 192.168. – Neil Aug 7 '09 at 2:27
up vote 3 down vote accepted

The server wasn't even running.

It seems in Ubuntu 9.04, the init.d scripts are broken.

If the /etc/default/samba config file has:


set, then the init.d script will fail to start smbd. So just set the variable to:


or delete that file entirely, and it will work fine.

share|improve this answer

protected by Community Aug 22 '12 at 0:29

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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