Cannot start Samba on Ubuntu server 18.04.4
by jonathanthomas83 from LinuxQuestions.org on (#5120J)
Hi guys,
Bear with me, I'm new to the forum and not an expert with Linux, Ubuntu or command line stuff.
My mapped network drive from my Ubuntu server has been randomly losing connection recently after I've started using it again after a fairly long break - it's now my corona-boredom-saviour-server! Nothing has changed except I run it from a BT wifi disk now and not a power socket ethernet connection.
I upgraded Ubuntu server to see if that fixed things, now running 18.04.4 LTS. I also use Webmin and it's not working there either (obviously).
Running
Code:sudo service smbd restartgives
Code:Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.the output from those are:
Code:smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2020-03-21 16:06:19 GMT; 8min ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Process: 22462 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=1/FAILURE)
Main PID: 22462 (code=exited, status=1/FAILURE)
Mar 21 16:06:19 ubuntu systemd[1]: Starting Samba SMB Daemon...
Mar 21 16:06:19 ubuntu systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Mar 21 16:06:19 ubuntu systemd[1]: smbd.service: Failed with result 'exit-code'.
Mar 21 16:06:19 ubuntu systemd[1]: Failed to start Samba SMB Daemon.and
Code:Unit smbd.service has begun starting up.
Mar 21 16:06:19 ubuntu systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Mar 21 16:06:19 ubuntu systemd[1]: smbd.service: Failed with result 'exit-code'.
Mar 21 16:06:19 ubuntu systemd[1]: Failed to start Samba SMB Daemon.
-- Subject: Unit smbd.service has failed
-- Defined-By: systemdI found a related thread : https://www.linuxquestions.org/quest...ba-4175625224/
and the output from a suggestion halfway down on the thread is this:
Code:ls -la /var/lib/samba/private/
total 844
drwxr-xr-x 3 root root 4096 Mar 20 09:32 .
drwxr-xr-x 5 root root 4096 Mar 20 09:32 ..
drwx------ 2 root root 4096 Mar 20 10:12 msg.sock
-rw------- 1 root root 421888 Mar 20 09:32 passdb.tdb
-rw------- 1 root root 430080 Mar 20 09:32 secrets.tdb
jonathan@ubuntu:~$ ls -la /var/lib/samba/private/msg.sock
ls: cannot open directory '/var/lib/samba/private/msg.sock': Permission denied
jonathan@ubuntu:~$ ls -la /var/lib/samba/lock/
ls: cannot access '/var/lib/samba/lock/': No such file or directory
jonathan@ubuntu:~$ ls -la /var/lib/samba/lock/msg.lock
ls: cannot access '/var/lib/samba/lock/msg.lock': No such file or directorySo there is no '/var/lib/samba/lock/' directory and no 'msg.lock' but that is now a 2 year old thread and I'm unsure if that is relevant.
I've tried to give all the information I can but am getting nowhere and was wondering if anyone here could help me out, please.
Very much appreciated.
Kind regards,
Jonathan


Bear with me, I'm new to the forum and not an expert with Linux, Ubuntu or command line stuff.
My mapped network drive from my Ubuntu server has been randomly losing connection recently after I've started using it again after a fairly long break - it's now my corona-boredom-saviour-server! Nothing has changed except I run it from a BT wifi disk now and not a power socket ethernet connection.
I upgraded Ubuntu server to see if that fixed things, now running 18.04.4 LTS. I also use Webmin and it's not working there either (obviously).
Running
Code:sudo service smbd restartgives
Code:Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.the output from those are:
Code:smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2020-03-21 16:06:19 GMT; 8min ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Process: 22462 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=1/FAILURE)
Main PID: 22462 (code=exited, status=1/FAILURE)
Mar 21 16:06:19 ubuntu systemd[1]: Starting Samba SMB Daemon...
Mar 21 16:06:19 ubuntu systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Mar 21 16:06:19 ubuntu systemd[1]: smbd.service: Failed with result 'exit-code'.
Mar 21 16:06:19 ubuntu systemd[1]: Failed to start Samba SMB Daemon.and
Code:Unit smbd.service has begun starting up.
Mar 21 16:06:19 ubuntu systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Mar 21 16:06:19 ubuntu systemd[1]: smbd.service: Failed with result 'exit-code'.
Mar 21 16:06:19 ubuntu systemd[1]: Failed to start Samba SMB Daemon.
-- Subject: Unit smbd.service has failed
-- Defined-By: systemdI found a related thread : https://www.linuxquestions.org/quest...ba-4175625224/
and the output from a suggestion halfway down on the thread is this:
Code:ls -la /var/lib/samba/private/
total 844
drwxr-xr-x 3 root root 4096 Mar 20 09:32 .
drwxr-xr-x 5 root root 4096 Mar 20 09:32 ..
drwx------ 2 root root 4096 Mar 20 10:12 msg.sock
-rw------- 1 root root 421888 Mar 20 09:32 passdb.tdb
-rw------- 1 root root 430080 Mar 20 09:32 secrets.tdb
jonathan@ubuntu:~$ ls -la /var/lib/samba/private/msg.sock
ls: cannot open directory '/var/lib/samba/private/msg.sock': Permission denied
jonathan@ubuntu:~$ ls -la /var/lib/samba/lock/
ls: cannot access '/var/lib/samba/lock/': No such file or directory
jonathan@ubuntu:~$ ls -la /var/lib/samba/lock/msg.lock
ls: cannot access '/var/lib/samba/lock/msg.lock': No such file or directorySo there is no '/var/lib/samba/lock/' directory and no 'msg.lock' but that is now a 2 year old thread and I'm unsure if that is relevant.
I've tried to give all the information I can but am getting nowhere and was wondering if anyone here could help me out, please.
Very much appreciated.
Kind regards,
Jonathan