当前位置:   article > 正文

重启samba服务器失败解决_job for smbd.service failed because the control pr

job for smbd.service failed because the control process exited with error co
sudo service smbd restart
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.
  • 1
  • 2
  • 3

重启失败,查看详细情况

systemctl status smbd.service
● smbd.service - Samba SMB Daemon
     Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Thu 2021-09-30 09:07:59 CST; 37s ago
       Docs: man:smbd(8)
             man:samba(7)
             man:smb.conf(5)
    Process: 32088 ExecStartPre=/usr/share/samba/update-apparmor-samba-profile (code=exited, status=0/SUCCESS)
    Process: 32097 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=1/FAILURE)
   Main PID: 32097 (code=exited, status=1/FAILURE)

Sep 30 09:07:59 ubuntu systemd[1]: Starting Samba SMB Daemon...
Sep 30 09:07:59 ubuntu systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Sep 30 09:07:59 ubuntu systemd[1]: smbd.service: Failed with result 'exit-code'.
Sep 30 09:07:59 ubuntu systemd[1]: Failed to start Samba SMB Daemon.
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
journalctl -xe
-- The job identifier is 9729 and the job result is failed.
Sep 30 09:09:01 ubuntu CRON[32100]: pam_unix(cron:session): session opened for user root by (uid=0)
Sep 30 09:09:01 ubuntu CRON[32101]: (root) CMD (  [ -x /usr/lib/php/sessionclean ] && if [ ! -d /run/systemd/system ]; then /usr/lib/php>
Sep 30 09:09:01 ubuntu CRON[32100]: pam_unix(cron:session): session closed for user root
Sep 30 09:09:22 ubuntu systemd[1]: Starting Clean php session files...
-- Subject: A start job for unit phpsessionclean.service has begun execution
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit phpsessionclean.service has begun execution.
-- 
-- The job identifier is 9796.
Sep 30 09:09:22 ubuntu sessionclean[32118]: PHP Warning:  PHP Startup: Unable to load dynamic library 'php_curl.so' (tried: /usr/lib/php>
Sep 30 09:09:22 ubuntu sessionclean[32118]: PHP Warning:  PHP Startup: Unable to load dynamic library 'php_mysql.so' (tried: /usr/lib/ph>
Sep 30 09:09:22 ubuntu sessionclean[32118]: PHP Warning:  PHP Startup: Unable to load dynamic library 'php_mysqli.so' (tried: /usr/lib/p>
Sep 30 09:09:22 ubuntu systemd[1]: phpsessionclean.service: Succeeded.
-- Subject: Unit succeeded
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- The unit phpsessionclean.service has successfully entered the 'dead' state.
Sep 30 09:09:22 ubuntu systemd[1]: Finished Clean php session files.
-- Subject: A start job for unit phpsessionclean.service has finished successfully
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- A start job for unit phpsessionclean.service has finished successfully.
-- 
-- The job identifier is 9796.

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31

看不出错误情况,打印samba日志

tail -f /var/log/samba/log.smbd
[2021/09/30 09:01:02.693433,  0] ../../source3/smbd/server.c:1775(main)
  smbd version 4.11.6-Ubuntu started.
  Copyright Andrew Tridgell and the Samba Team 1992-2019
[2021/09/30 09:01:02.704827,  0] ../../lib/util/util.c:427(directory_create_or_exist_strict)
  invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0777 should be 0700
[2021/09/30 09:07:59.966661,  0] ../../source3/smbd/server.c:1775(main)
  smbd version 4.11.6-Ubuntu started.
  Copyright Andrew Tridgell and the Samba Team 1992-2019
[2021/09/30 09:07:59.966945,  0] ../../lib/util/util.c:427(directory_create_or_exist_strict)
  invalid permissions on directory '/var/lib/samba/private/msg.sock': has 0777 should be 0700

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12

msg.sock文件权限问题,修改文件权限

sudo chmod 700 /var/lib/samba/private/msg.sock
  • 1

再次重启samba

sudo service smbd restart
  • 1
本文内容由网友自发贡献,转载请注明出处:【wpsshop博客】
推荐阅读
相关标签
  

闽ICP备14008679号