Job for smb.service failed because the control process exited with error code.
I just recently installed the samba server on my Red Hat Linux 7 / RHEL 7 operating system server. After configuration when I have taken restart of samba service, I have got the above error. Due to this samba service not running on my linux machine.
[root@localhost~]# systemctl restart smb.service
I will reveive below error
Job for smb.service failed because the control process exited with error code.
See "systemctl status smb.service" and "journalctl -xe" for details.
So in such case, first I have checked the my samba configuration is ok or not, to do this, please run the below command.
#smbstatus
the above command gives me the below output.
"WARNING: Ignoring invalid value 'share' for parameter 'security'
Can't load /etc/samba/smb.conf - run testparm to debug it"
That's means something wrong in my samba configuration.
So open the /etc/samba/smb.conf file and commented the below line which starts with security.
#security = server
now again run the smbstatus command which gives the new output.
[root@localhost~]# smbstatus
Samba version 4.2.10
PID Username Group Machine Protocol Version
------------------------------------------------------------------------------
Service pid machine Connected at
-------------------------------------------------------
If you are getting such output that means now your configuration is ok, now please restart the samba service again.
[root@localhost~]# systemctl restart smb.service
[root@localhost~]# systemctl status smb.service
● smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2018-04-26 16:19:34 BST; 12h ago
Main PID: 4719 (smbd)
Status: "smbd: ready to serve connections..."
CGroup: /system.slice/smb.service
├─4719 /usr/sbin/smbd
├─4720 /usr/sbin/smbd
├─4721 /usr/sbin/smbd
└─4722 /usr/sbin/smbd
Apr 26 16:19:33 localhost.redhat.com systemd[1]: Starting Samba SMB Daemon...
Apr 26 16:19:33 localhost.redhat.com systemd[1]: smb.service: Supervising process 4719 which is not our child. We'll most likely not notice when it exits.
Apr 26 16:19:34 localhost.redhat.com smbd[4719]: [2018/04/26 16:19:34.173413, 0] ../lib/util/become_daemon.c:124(daemon_ready)
Apr 26 16:19:34 localhost.redhat.com systemd[1]: Started Samba SMB Daemon.
Apr 26 16:19:34 localhost.redhat.com smbd[4719]: STATUS=daemon 'smbd' finished starting up and ready to serve connections
I will reveive below error
Job for smb.service failed because the control process exited with error code.
See "systemctl status smb.service" and "journalctl -xe" for details.
So in such case, first I have checked the my samba configuration is ok or not, to do this, please run the below command.
#smbstatus
the above command gives me the below output.
"WARNING: Ignoring invalid value 'share' for parameter 'security'
Can't load /etc/samba/smb.conf - run testparm to debug it"
That's means something wrong in my samba configuration.
So open the /etc/samba/smb.conf file and commented the below line which starts with security.
#security = server
now again run the smbstatus command which gives the new output.
[root@localhost~]# smbstatus
Samba version 4.2.10
PID Username Group Machine Protocol Version
------------------------------------------------------------------------------
Service pid machine Connected at
-------------------------------------------------------
If you are getting such output that means now your configuration is ok, now please restart the samba service again.
[root@localhost~]# systemctl restart smb.service
[root@localhost~]# systemctl status smb.service
● smb.service - Samba SMB Daemon
Loaded: loaded (/usr/lib/systemd/system/smb.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2018-04-26 16:19:34 BST; 12h ago
Main PID: 4719 (smbd)
Status: "smbd: ready to serve connections..."
CGroup: /system.slice/smb.service
├─4719 /usr/sbin/smbd
├─4720 /usr/sbin/smbd
├─4721 /usr/sbin/smbd
└─4722 /usr/sbin/smbd
Apr 26 16:19:33 localhost.redhat.com systemd[1]: Starting Samba SMB Daemon...
Apr 26 16:19:33 localhost.redhat.com systemd[1]: smb.service: Supervising process 4719 which is not our child. We'll most likely not notice when it exits.
Apr 26 16:19:34 localhost.redhat.com smbd[4719]: [2018/04/26 16:19:34.173413, 0] ../lib/util/become_daemon.c:124(daemon_ready)
Apr 26 16:19:34 localhost.redhat.com systemd[1]: Started Samba SMB Daemon.
Apr 26 16:19:34 localhost.redhat.com smbd[4719]: STATUS=daemon 'smbd' finished starting up and ready to serve connections