So when I first boot or reboot, smbd and nmbd are running but my shared folders aren't available. After a

sudo service smbd restart

everything is fine. My configuration is simple, using the local workgroup without winbind and there aren't any errors in log.(s|n)mbd.

Any ideas on how I can get rid of this additional restart?

Here's my smb.conf and I'm not sharing from a home dir or an encrypted partition.


   workgroup = WORKGROUP
   server string = %h server (Samba, Ubuntu)
   dns proxy = no

interfaces = lo eth0
hosts allow =
bind interfaces only = true
client ntlmv2 auth = yes

   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d

security = share
guest account = nobody

   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* ...
   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

    comment = Media 
    path = /media/archive_a
    browseable = no 
    read only = yes
    guest ok = yes

    comment = Firefly 
    path = /usr/local/firefly
    browseable = no 
    read only = no
    guest ok = yes
  • Please add your configuration to your question, also do you share any folders from inside your home folder? Is it encrypted? – Bruno Pereira Feb 26 '12 at 21:52

You have changed /etc/samba/smb.conf to have smbd bind to a specific interface.

interfaces = lo eth0
bind interfaces only = true

Therefore you also need to edit /etc/init/smbd.conf to ensure that smbd starts only after that your interface is up as described in https://bugs.launchpad.net/ubuntu/+source/samba/+bug/771305/comments/17

so, edit /etc/init/smbd.conf and change

start on (local-filesystems and net-device-up)


start on (local-filesystems and net-device-up IFACE=eth0 and started udev-finish)

hmmm I know it is a hack, but can't you do the additional restart in a startup script, until you got the final answer? =D just my 2 bits..

  • Ah, the eternal conflict ... put more time into finding a "real" solution or just hack the f****** thing :) – user47015 Feb 27 '12 at 1:12
  • Hey, I already pointed this out... Just a hack until he/us find a real solution. @Jaguar0616 – H_7 Feb 29 '12 at 12:14
  • No offense meant, I appreciated the reply. Doing the extra restart in a script is exactly what I'm doing right now, still haven't found the underlying cause of the problem. – user47015 Feb 29 '12 at 19:15
  • @Jaguar0616 Nice Jaguar. Maybe my answer should be a comment, no upvotes for it... =/ – H_7 Mar 3 '12 at 14:32

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.