检查状态时:
smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
abr 30 19:20:02 (nome_do_pc) systemd[1]: /lib/systemd/system/smbd.service:9:
PIDFile= references path below legacy directory /var/run/, updating /var/run/samba/smbd.pid → /run/samba/smbd.pid; pl
abr 30 19:20:04 (nome_do_pc) systemd[1]: /lib/systemd/system/smbd.service:9:
PIDFile= references path below legacy directory /var/run/, updating /var/run/samba/smbd.pid → /run/samba/smbd.pid; pl
abr 30 19:20:05 (nome_do_pc) systemd[1]: /lib/systemd/system/smbd.service:9:
PIDFile= references path below legacy directory /var/run/, updating /var/run/samba/smbd.pid → /run/samba/smbd.pid; pl
...skipping...
正在尝试重新启动:
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.
尝试重新安装:
Samba is not being run as an AD Domain Controller: Masking samba-ad-dc.service
Please ignore the following error about deb-systemd-helper not finding those services.
(samba-ad-dc.service already masked)
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript smbd, action "restart" failed.
smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2019-04-30 19:37:40 -03; 6ms ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Process: 20244 ExecStart=/usr/sbin/smbd --foreground --no-process-group $SMBDOPTIONS (code=exited, status=1/FAILURE)
Main PID: 20244 (code=exited, status=1/FAILURE)
abr 30 19:37:40 (nome_do_pc) systemd[1]: Starting Samba SMB Daemon...
abr 30 19:37:40 (nome_do_pc) smbd[20244]: [2019/04/30 19:37:40.547061, 0] ../../lib/param/loadparm.c:1609(set_variable_helper)
abr 30 19:37:40 (nome_do_pc) smbd[20244]: set_variable_helper(Yes): value is not boolean!
abr 30 19:37:40 (nome_do_pc) systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
abr 30 19:37:40 (nome_do_pc) systemd[1]: smbd.service: Failed with result 'exit-code'.
abr 30 19:37:40 (nome_do_pc) systemd[1]: Failed to start Samba SMB Daemon.
dpkg: erro ao processar o pacote samba (--configure):
o subprocesso instalado, do pacote samba, o post-installation script returned an error of exit status 1
Processing 'triggers' for ufw (0.36-1ubuntu1) ...
Regras atualizadas para o perfil 'Samba'
Reloaded firewall
Processing 'triggers' for systemd (240-6ubuntu5) ...
Processing 'triggers' for man-db (2.8.5-2) ...
Processing 'triggers' for libc-bin (2.29-0ubuntu2) ...
Errors were encountered during processing of:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
如果在 smb.conf 中将安全性设置为共享,我将收到确切的错误消息。
运行以下命令:
testparm -s
您是否收到错误:
WARNING: Ignoring invalid value 'share' for parameter 'security'
Error loading services.
如果您愿意,请编辑 /etc/samba/smb.conf 并找到该security = share
行并将其删除。
然后再次重新启动 smbd。