samba fails to start at boot after 15.04 upgrade

Bug #1478289 reported by Tessa
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

After upgrading to 15.04 from 14.10, Samba no longer starts at boot. I suspect it's related to the switch to systemd, as attempting to set it to start using the systemd tools results in a bunch of error messages:

root@c1:~# systemctl enable samba
Synchronizing state for samba.service with sysvinit using update-rc.d...
Executing /usr/sbin/update-rc.d samba defaults
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused
The script you are attempting to invoke has been converted to an Upstart
job, but lsb-header is not supported for Upstart jobs.
Executing /usr/sbin/update-rc.d samba enable
update-rc.d: error: samba Default-Start contains no runlevels, aborting.

ProblemType: Bug
DistroRelease: Ubuntu 15.04
Package: samba 2:4.1.13+dfsg-4ubuntu3
ProcVersionSignature: Ubuntu 3.19.0-23.24-generic 3.19.8-ckt2
Uname: Linux 3.19.0-23-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.17.2-0ubuntu1.1
Architecture: amd64
Date: Sat Jul 25 16:09:47 2015
InstallationDate: Installed on 2014-11-09 (258 days ago)
InstallationMedia: Ubuntu-Server 14.10 "Utopic Unicorn" - Release amd64 (20141022.2)
OtherFailedConnect: Yes
ProcEnviron:
 LANGUAGE=en_CA:en
 TERM=screen
 PATH=(custom, no user)
 LANG=en_CA.UTF-8
 SHELL=/bin/bash
SambaServerRegression: Yes
SmbConfIncluded: No
SourcePackage: samba
UpgradeStatus: Upgraded to vivid on 2015-07-25 (0 days ago)

Revision history for this message
Tessa (unit3) wrote :
Revision history for this message
Tessa (unit3) wrote :

Can't find any systemd specific init scripts for samba, either:

root@c1:/etc/systemd# find . | grep samba
root@c1:/etc/systemd# find . | grep smb
root@c1:/etc/systemd# find . | grep nmb

Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

On my test on Vivid, /lib/systemd/system/samba.service exists, is a symlink to /dev/null, and causes "sudo systemctl start samba" to output "Failed to start samba.service: Unit samba.service is masked.". Instead, /etc/init.d/{smbd,nmbd} work directly, and "sudo systemdctl {start|stop} {smbd|nmbd}" both appear to work correctly. On reboot, smbd and nmbd are both started correctly.

So it seems that I cannot reproduce, though I haven't tried an upgrade for Utopic. Do you have a previous customised version of /etc/init.d/samba that you have not updated for Vivid?

Please provide steps to reproduce, and once done, change the bug status back to New. Thanks!

Changed in samba (Ubuntu):
status: New → Incomplete
Revision history for this message
Robie Basak (racb) wrote :

I tried an upgrade from Utopic and still can't reproduce. /lib/systemd/system/samba.service still exists, is a symlink to /dev/null, and causes "sudo systemctl start samba" to output "Failed to start samba.service: Unit samba.service is masked.".

Revision history for this message
Tessa (unit3) wrote :

Huh, I'm seeing the same behaviour as you now:

nergdron@c1:~⟫ ls -l /lib/systemd/system/samba.service
lrwxrwxrwx 1 root root 9 Apr 3 14:32 /lib/systemd/system/samba.service -> /dev/null
nergdron@c1:~⟫ sydi 0u^C
130 nergdron@c1:~⟫ sudo -i
[sudo] password for nergdron:
root@c1:~# systemctl start samba
Failed to start samba.service: Unit samba.service is masked.
root@c1:~# update-rc.d samba defaults

I can't explain the behaviour I was seeing on the weekend, there must have been some other interactions on my box I can't reproduce now. I guess this is not a bug, thanks!

Revision history for this message
N3tD3vil (n3td3vil) wrote :

This is Not Bug!
Use it:

root@N3tD3vil:~# update-rc.d smbd enable
root@N3tD3vil:~# update-rc.d nmbd enable

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for samba (Ubuntu) because there has been no activity for 60 days.]

Changed in samba (Ubuntu):
status: Incomplete → Expired
Revision history for this message
Maimon Mons (mmcmonster) wrote :

Not the original poster, but I have the same problem. I get:

/etc/systemd $ sudo update-rc.d smbd enable
update-rc.d: warning: start runlevel arguments (none) do not match smbd Default-Start values (2 3 4 5)
update-rc.d: warning: stop runlevel arguments (none) do not match smbd Default-Stop values (0 1 6)
 System start/stop links for /etc/init.d/smbd do not exist.

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.