Samba needs to be stopped and restarted in order to work

Bug #996968 reported by Elbarbudo
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

1- I setup samba in order to have my server act as Domain Controller (I have NO windows server)
2- after each reboot of my server (Internity), smbd and nmbd are running, but I am unable to connect to it
     (see first screen capture)
3- stopping and restarting smbd and nmbd fixes this.
     It seems that on the first start, either smb did not uses the right smb.conf file, or that an early startup of samba
     make it miss some files or ressources.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: samba 2:3.6.3-2ubuntu2.1
ProcVersionSignature: Ubuntu 3.2.0-24.37-generic 3.2.14
Uname: Linux 3.2.0-24-generic x86_64
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
Date: Wed May 9 09:36:18 2012
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
SourcePackage: samba
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Elbarbudo (patricearnal) wrote :
Revision history for this message
Elbarbudo (patricearnal) wrote :
Revision history for this message
Elbarbudo (patricearnal) wrote :
Revision history for this message
Elbarbudo (patricearnal) wrote :

This behaviour was observed in Ubuntu 11.10 too.

Revision history for this message
James Page (james-page) wrote :

Thanks for taking the time to report this bug in Ubuntu.

I've seen similar issues when using the following configuration:

  bind interfaces only = yes

This causes samba to only bind to selected interfaces rather than 0.0.0.0 - as it starts early in the boot process this fails as its not guaranteed that all network interfaces have started when smbd does:

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

When you restart smbd after boot the network interfaces have started so all works OK.

I would suggest that you either reconfigure samba to listen more generically or add a upstart stanza to /etc/init/smbd.override:

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

You will need to change this to fit your configuration - i.e. which network interface provides 192.168.0.0/24. For more information see 'man 5 init'.

I'm going to mark the bug as 'Invalid' as I think its specific to your local samba configuration. If you think this is not the case please comment and mark as 'New'.

Thanks

Changed in samba (Ubuntu):
status: New → Invalid
Revision history for this message
Miroslav Zaťko (mirec-z) wrote :

confirmed on fresh install of ubuntu 12.04TLS, it is definitely not dependent on PArnal's local configuration,
for me even "start on (local-filesystems and net-device-up IFACE=eth0)" did not help
it needs restart of smbd/nmbd after each reboot

Changed in samba (Ubuntu):
status: Invalid → Confirmed
Revision history for this message
Julian Haagsma (jhaagsma) wrote :

This also affects me; I was simply follwing the recommendation, in the configuration file, since my server is also a firewall:

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself. However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
   bind interfaces only = yes

Revision history for this message
Julian Haagsma (jhaagsma) wrote :

I forgot to mention that this is on ubuntu 12.04LTS for me as well.

Revision history for this message
Reuben Rowe (reuben-rowe) wrote :

I have also just observed this on my 12.05LTS install as well.

Revision history for this message
Reuben Rowe (reuben-rowe) wrote :

12.04LTS (typo)

Revision history for this message
Adrien Beau (adrienbeau) wrote :

This bug is still present in 14.04 LTS. Putting the following line in /etc/init/smbd.override solves it for me:

start on (local-filesystems and net-device-up IFACE!=lo)

(Putting this line in /etc/init/smbd.conf also works of course.)

Why can't this line be included in the standard smbd.conf that ships with Ubuntu? The only downside I can see is that on computers which only have a loopback interface, Samba will not start. But why would someone want to use Samba in such a configuration?

Revision history for this message
Adrien Beau (adrienbeau) wrote :

By the way, this bug seems to be a duplicate of https://bugs.launchpad.net/ubuntu/+source/samba/+bug/951087

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.