Samba needs additional restart on reboot?

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.

[global] workgroup = WORKGROUP server string = %h server (Samba, Ubuntu) dns proxy = no
interfaces = lo eth0
hosts allow = 127.0.0.1 192.168.1.0/24 192.168.2.0/24
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
[printers] comment = All Printers browseable = no path = /var/spool/samba printable = yes guest ok = no read only = yes create mask = 0700
[print$] comment = Printer Drivers path = /var/lib/samba/printers browseable = yes read only = yes guest ok = no
[Media] comment = Media path = /media/archive_a browseable = no read only = yes guest ok = yes
[Firefly] comment = Firefly path = /usr/local/firefly browseable = no read only = no guest ok = yes
1

2 Answers

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

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

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

with

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

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

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like