赞
踩
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.
重启失败,查看详细情况
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.
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.
看不出错误情况,打印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
msg.sock文件权限问题,修改文件权限
sudo chmod 700 /var/lib/samba/private/msg.sock
再次重启samba
sudo service smbd restart
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。