LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-08-2018, 05:09 PM   #1
rtcary
Member
 
Registered: Dec 2004
Location: Petaluma, CA
Distribution: Centos 4 and RH 9
Posts: 76

Rep: Reputation: 15
Cannot start samba


I recently installed KDE on my Centos 7 server (small home server for test web pages). While trying to get samba working, I can no longer start it; these are the errors I'm getting:

Code:
● smb.service - Samba SMB Daemon
   Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2018-03-08 12:04:27 PST; 4min 38s ago
  Process: 21068 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
 Main PID: 21068 (code=exited, status=1/FAILURE)

Mar 08 12:04:27 centos7 systemd[1]: Starting Samba SMB Daemon...
Mar 08 12:04:27 centos7 systemd[1]: smb.service: main process exited, code=exited, status=1/FAILURE
Mar 08 12:04:27 centos7 systemd[1]: Failed to start Samba SMB Daemon.
Mar 08 12:04:27 centos7 systemd[1]: Unit smb.service entered failed state.
Mar 08 12:04:27 centos7 systemd[1]: smb.service failed.
and the error suggested that I run journalctl -xe where I get:

Code:
Mar 08 12:37:02 centos7 systemd[1]: Starting Samba SMB Daemon...
-- Subject: Unit smb.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit smb.service has begun starting up.
Mar 08 12:37:02 centos7 systemd[1]: smb.service: main process exited, code=exited, status=1/FAILURE
Mar 08 12:37:02 centos7 systemd[1]: Failed to start Samba SMB Daemon.
-- Subject: Unit smb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit smb.service has failed.
-- 
-- The result is failed.
Mar 08 12:37:02 centos7 systemd[1]: Unit smb.service entered failed state.
Mar 08 12:37:02 centos7 systemd[1]: smb.service failed.
Mar 08 12:37:02 centos7 polkitd[786]: Unregistered Authentication Agent for unix-process:2921:64860 (system bus name :1.99, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Mar 08 12:40:01 centos7 systemd[1]: Created slice User Slice of root.
-- Subject: Unit user-0.slice has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit user-0.slice has finished starting up.
-- 
-- The start-up result is done.
Mar 08 12:40:01 centos7 systemd[1]: Starting User Slice of root.
-- Subject: Unit user-0.slice has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit user-0.slice has begun starting up.
These error messages our outside my area of expertise, so he any suggestions are welcomed.

Many thanks...

Todd
 
Old 03-08-2018, 07:11 PM   #2
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,393

Rep: Reputation: 575Reputation: 575Reputation: 575Reputation: 575Reputation: 575Reputation: 575
I'd start by examining /etc/samba/smb.conf perhaps. What does the following report?
Code:
testparm
 
Old 03-12-2018, 11:54 AM   #3
rtcary
Member
 
Registered: Dec 2004
Location: Petaluma, CA
Distribution: Centos 4 and RH 9
Posts: 76

Original Poster
Rep: Reputation: 15
Here are the results of testparm:
Code:
[root@centos7 tcary]# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Processing section "[html]"
Loaded services file OK.
Server role: ROLE_STANDALONE

# Global parameters
[global]
	server string = %v
	workgroup = WEB01
	printcap name = cups
	server min protocol = SMB2
	security = USER
	idmap config * : backend = tdb
	cups options = raw


[homes]
	comment = Home Directories
	browseable = No
	inherit acls = Yes
	read only = No
	valid users = %S %D%w%S


[printers]
	comment = All Printers
	path = /var/tmp
	browseable = No
	printable = Yes
	create mask = 0600


[print$]
	comment = Printer Drivers
	path = /var/lib/samba/drivers
	create mask = 0664
	directory mask = 0775
	write list = root


[html]
	path = /var/www/html
	create mask = 0775
	read only = No
And when I try to start smb.service I get:

Code:
[root@centos7 tcary]# systemctl start smb.service
Job for smb.service failed because the control process exited with error code. See "systemctl status smb.service" and "journalctl -xe" for details.
And journalctl -xe gives me:

Code:
[root@centos7 tcary]# systemctl start smb.service
Job for smb.service failed because the control process exited with error code. See "systemctl status smb.service" and "journalctl -xe" for details.
[root@centos7 tcary]# ^C
[root@centos7 tcary]# journalctl -xe
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit user-0.slice has begun shutting down.
Mar 12 08:47:02 centos7 polkitd[786]: Registered Authentication Agent for unix-process:1600:32884823 (system bus name :1.1415 [/usr/bin/pk
Mar 12 08:47:02 centos7 systemd[1]: Starting Samba SMB Daemon...
-- Subject: Unit smb.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit smb.service has begun starting up.
Mar 12 08:47:02 centos7 systemd[1]: smb.service: main process exited, code=exited, status=1/FAILURE
Mar 12 08:47:02 centos7 systemd[1]: Failed to start Samba SMB Daemon.
-- Subject: Unit smb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit smb.service has failed.
-- 
-- The result is failed.
Mar 12 08:47:02 centos7 systemd[1]: Unit smb.service entered failed state.
Mar 12 08:47:02 centos7 systemd[1]: smb.service failed.
Mar 12 08:47:02 centos7 polkitd[786]: Unregistered Authentication Agent for unix-process:1600:32884823 (system bus name :1.1415, object pa
Any suggestion?

Todd
 
Old 03-12-2018, 12:18 PM   #4
rtcary
Member
 
Registered: Dec 2004
Location: Petaluma, CA
Distribution: Centos 4 and RH 9
Posts: 76

Original Poster
Rep: Reputation: 15
I checked the log file for smb/nmb are got this:

Code:
[root@centos7 private]# cat /var/log/samba/log.nmbd
[2018/03/12 07:56:03.295028,  0] ../lib/util/util.c:281(directory_create_or_exist_strict)
  invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0755 should be 0700
[2018/03/12 07:58:02.757003,  0] ../lib/util/util.c:281(directory_create_or_exist_strict)
  invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0755 should be 0700
[2018/03/12 09:05:56.024597,  0] ../lib/util/util.c:281(directory_create_or_exist_strict)
  invalid permissions on directory '/var/lib/samba/lock/msg.lock': has 0700 should be 0755
However the permissions look OK

Code:
[root@centos7 private]# ls -l
total 832
drwx------. 2 root root     42 Feb 22 15:37 msg.sock
-rwx------. 1 root root 421888 Feb 15 19:28 passdb.tdb
-rwx------. 1 root root 430080 Feb 19 09:04 secrets.tdb
Do you think an uninstall of samba and reinstall would help?

Todd
 
Old 03-12-2018, 05:00 PM   #5
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,393

Rep: Reputation: 575Reputation: 575Reputation: 575Reputation: 575Reputation: 575Reputation: 575
Try removing and recreating the directory
Code:
rm -rf /var/lib/samba/private
Code:
mkdir /var/lib/samba/private
Code:
chmod 0700 /var/lib/samba/private
then restart smb
Code:
systemctl restart smb
Any better?

Last edited by ferrari; 03-12-2018 at 05:04 PM.
 
Old 03-12-2018, 07:03 PM   #6
rtcary
Member
 
Registered: Dec 2004
Location: Petaluma, CA
Distribution: Centos 4 and RH 9
Posts: 76

Original Poster
Rep: Reputation: 15
I did that and did not get any resolution. Also, the /var/log/samba directory does not have any new entries.

Code:
-- Unit smb.service has begun starting up.
Mar 12 15:48:08 centos7 systemd[1]: smb.service: main process exited, code=exited, status=1/FAILURE
Mar 12 15:48:08 centos7 systemd[1]: Failed to start Samba SMB Daemon.
-- Subject: Unit smb.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit smb.service has failed.
-- 
-- The result is failed.
Mar 12 15:48:08 centos7 systemd[1]: Unit smb.service entered failed state.
Mar 12 15:48:08 centos7 systemd[1]: smb.service failed.
Mar 12 15:48:08 centos7 polkitd[786]: Unregistered Authentication Agent for unix-process:7133:35411460 (system bus name :1.1517, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) (disconnected from bus)
Mar 12 15:50:01 centos7 systemd[1]: Created slice User Slice of root.
-- Subject: Unit user-0.slice has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit user-0.slice has finished starting up.
-- 
-- The start-up result is done.
Mar 12 15:50:01 centos7 systemd[1]: Starting User Slice of root.
-- Subject: Unit user-0.slice has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit user-0.slice has begun starting up.
Mar 12 15:50:01 centos7 systemd[1]: Started Session 695 of user root.
-- Subject: Unit session-695.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit session-695.scope has finished starting up.
-- 
-- The start-up result is done.
Mar 12 15:50:01 centos7 systemd[1]: Starting Session 695 of user root.
-- Subject: Unit session-695.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit session-695.scope has begun starting up.
Mar 12 15:50:01 centos7 CROND[7198]: (root) CMD (/usr/lib64/sa/sa1 1 1)
Mar 12 15:50:01 centos7 systemd[1]: Removed slice User Slice of root.
-- Subject: Unit user-0.slice has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit user-0.slice has finished shutting down.
Mar 12 15:50:01 centos7 systemd[1]: Stopping User Slice of root.
-- Subject: Unit user-0.slice has begun shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit user-0.slice has begun shutting down.
As I recall, but not certain, there was an update to Centos 7 before this elusive problem surfaced.

Before trying your suggestion I did a

Code:
yum reinstall samba.x86_64
\rtc
 
Old 03-12-2018, 07:17 PM   #7
rtcary
Member
 
Registered: Dec 2004
Location: Petaluma, CA
Distribution: Centos 4 and RH 9
Posts: 76

Original Poster
Rep: Reputation: 15
And just to keep things confusing, if I try to start nmb.service, I get the following in log.nmbd:

Code:
[root@centos7 samba]# cat log.nmbd
[2018/03/12 07:56:03.295028,  0] ../lib/util/util.c:281(directory_create_or_exist_strict)
  invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0755 should be 0700
[2018/03/12 07:58:02.757003,  0] ../lib/util/util.c:281(directory_create_or_exist_strict)
  invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0755 should be 0700
[2018/03/12 09:05:56.024597,  0] ../lib/util/util.c:281(directory_create_or_exist_strict)
  invalid permissions on directory '/var/lib/samba/lock/msg.lock': has 0700 should be 0755
[2018/03/12 16:07:21.874661,  0] ../lib/util/util.c:281(directory_create_or_exist_strict)
  invalid permissions on directory '/var/lib/samba/lock/msg.lock': has 0700 should be 0755
\rtc
 
Old 03-12-2018, 07:25 PM   #8
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.5
Posts: 2,211

Rep: Reputation: 688Reputation: 688Reputation: 688Reputation: 688Reputation: 688Reputation: 688
Please post results of:
Code:
ls -la /var/lib/samba/private/
ls -la /var/lib/samba/private/msg.sock
ls -la /var/lib/samba/lock/
ls -la /var/lib/samba/lock/msg.lock
 
Old 03-12-2018, 07:38 PM   #9
rtcary
Member
 
Registered: Dec 2004
Location: Petaluma, CA
Distribution: Centos 4 and RH 9
Posts: 76

Original Poster
Rep: Reputation: 15
Here they are:
Code:
[root@centos7 samba]# ls -la /var/lib/samba/private/
total 0
drwx------  2 root root   6 Mar 12 15:47 .
drwx------. 6 root root 217 Mar 12 15:47 ..
[root@centos7 samba]# ls -la /var/lib/samba/private/msg.sock
ls: cannot access /var/lib/samba/private/msg.sock: No such file or directory
[root@centos7 samba]# ls -la /var/lib/samba/lock/
total 220
drwxr-xr-x. 3 root root  4096 Nov 27 08:21 .
drwx------. 6 root root   217 Mar 12 15:47 ..
-rwx------. 1 root root 40200 Feb 21 10:30 brlock.tdb
-rwx------. 1 root root 20480 Feb 22 15:37 gencache_notrans.tdb
-rwx------. 1 root root   696 Feb 21 10:30 leases.tdb
-rwx------. 1 root root 40200 Feb 21 10:30 locking.tdb
drwx------. 2 root root    42 Feb 22 15:37 msg.lock
-rwx------. 1 root root   696 Feb 15 19:28 mutex.tdb
-rwx------. 1 root root 12288 Feb 21 10:30 names.tdb
-rwx------. 1 root root 12288 Feb 22 15:27 printer_list.tdb
-rwx------. 1 root root  8192 Feb 22 15:37 serverid.tdb
-rwx------  1 root root 16384 Feb 22 15:03 smbd_cleanupd.tdb
-rwx------  1 root root   696 Feb 22 15:03 smbXsrv_client_global.tdb
-rwx------. 1 root root   696 Feb 21 10:30 smbXsrv_open_global.tdb
-rwx------. 1 root root 32768 Feb 21 10:38 smbXsrv_session_global.tdb
-rwx------. 1 root root   696 Feb 21 10:30 smbXsrv_tcon_global.tdb
-rwx------. 1 root root 16384 Feb 21 10:30 smbXsrv_version_global.tdb
[root@centos7 samba]# ls -la /var/lib/samba/lock/msg.lock
total 16
drwx------. 2 root root   42 Feb 22 15:37 .
drwxr-xr-x. 3 root root 4096 Nov 27 08:21 ..
-rwx------  1 root root   20 Feb 19 14:37 1669
-rwx------  1 root root   20 Feb 21 10:30 4187
-rwx------  1 root root   21 Feb 21 10:30 4188
 
Old 03-12-2018, 07:59 PM   #10
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.5
Posts: 2,211

Rep: Reputation: 688Reputation: 688Reputation: 688Reputation: 688Reputation: 688Reputation: 688
So, no directory /var/lib/samba/private/msg.sock at all.
And /var/lib/samba/lock/msg.lock is, in fact, at 700, while it wants to be at 755, according to the error message.
Code:
drwx------. 2 root root    42 Feb 22 15:37 msg.lock
Suggest changing the permissions on that directory, and figuring out where /var/lib/samba/private/msg.sock went.

Also, change the permissions on /var/lib/samba/private/ to 755. If set at 700, nothing will be able to read into the directory.

Try those two things and let us know what happens. Please.

Last edited by scasey; 03-12-2018 at 08:01 PM.
 
Old 03-12-2018, 08:39 PM   #11
rtcary
Member
 
Registered: Dec 2004
Location: Petaluma, CA
Distribution: Centos 4 and RH 9
Posts: 76

Original Poster
Rep: Reputation: 15
Made those changes, and
Code:
systemctl start smb.service
executes without indicating an error as well as starting nmb.service.

What process creates those directories?

Next challenge is to see if I can get samba to work with Windows 10.

MANY thanks for the assistance. I was concerned to make those changes since I have never had to make changes to the /var directories other than the ./www/html.

\rtc
 
Old 03-12-2018, 09:03 PM   #12
scasey
Senior Member
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.5
Posts: 2,211

Rep: Reputation: 688Reputation: 688Reputation: 688Reputation: 688Reputation: 688Reputation: 688
Glad I could help. I don't know anything about smb...I was just advising checking what the error messages said to check. Apparently the install process didn't set the permies correctly on those directories.

Please mark the thread SOLVED.
 
Old 03-12-2018, 09:20 PM   #13
ferrari
Senior Member
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 3,393

Rep: Reputation: 575Reputation: 575Reputation: 575Reputation: 575Reputation: 575Reputation: 575
Once you removed them smbd should have recreated them with the appropriate permissions AFAIU.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
samba refuses to start on startup, but will start manually pepsimachine15 Linux - Software 8 04-20-2009 12:03 PM
when i try to start samba pdc's smb service nmbd failed to start . sandeepchau123 Linux - Newbie 2 10-20-2007 02:59 PM
Cannot start Samba-why? zener Ubuntu 3 04-27-2006 02:41 PM
Installed the wrong SAMBA packages.Now samba doesn't start Terrence Hinds Linux - Networking 3 10-11-2004 04:40 AM
when i restart SAMBA,it says:stop samba failed,start SAMBA OK! whepin Linux - Networking 3 12-26-2001 06:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration