1

I am running a fresh install of Ubuntu Server 16.04.1 and having troubles with smbd. service smbd status tells me that smbd should be running:

   ● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
   Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)
   Active: active (exited) since Die 2016-10-18 17:35:23 CEST; 2s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 24218 ExecStop=/etc/init.d/smbd stop (code=exited, status=0/SUCCESS)
  Process: 21980 ExecReload=/etc/init.d/smbd reload (code=exited, status=0/SUCCESS)
  Process: 25190 ExecStart=/etc/init.d/smbd start (code=exited, status=0/SUCCESS)

Okt 18 17:35:22 speedy systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)...
Okt 18 17:35:23 speedy smbd[25190]:  * Starting SMB/CIFS daemon smbd
Okt 18 17:35:23 speedy smbd[25190]:    ...done.
Okt 18 17:35:23 speedy systemd[1]: Started LSB: start Samba SMB/CIFS daemon (smbd).

and this can be verified by ps axf | grep smbd:

25356 pts/2    S+     0:00  |   \_ grep --color=auto smbd
19915 ?        Ss     0:08      \_ /usr/sbin/smbd -D
19919 ?        S      0:00          \_ /usr/sbin/smbd -D

However, netstat -tpln | grep "smbd" returns nothing and also nmap shows "closed" on ports 139 and 445.

What I tried so far is activating these options in /etc/samba/smb.conf, but it doesn't help:

interfaces = enp2s0 bind interfaces only = true

If I start Samba in foreground using /usr/sbin/smbd -F, it works. I can then connect from another machine to the server and exchange files.

I have no clue that there might be wrong or how I could track down the problem.

Best regards,

Michael

1 Answer 1

1

Got the same issue, in my case the problem was that another issue of smbd was running in a docker container, which was detected by start-stop-daemon, so it wouldn't start the service. In this case, I've changed this line in the file /etc/init.d/smbd:

 if ! start-stop-daemon --start --quiet --oknodo --exec /usr/sbin/smbd -- -D ; then

to:

 if ! start-stop-daemon --start --quiet --oknodo --pidfile /var/run/samba/smbd.pid --exec /usr/sbin/smbd -- -D ; then

This way it starts smbd if it's pid file does not exist.

1
  • Perfect, thanks a lot! I have smbd running in LXC containers which seems to cause the same effect than you experience with docker. Aug 20, 2017 at 9:51

Your Answer

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

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