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
Best Answer
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
:to:
This way it starts smbd if it's pid file does not exist.