Samba 在 ubuntu 服务器 14.04 上运行良好。升级到16.10后就不再启动了。我也尝试在新的 16.10 虚拟机上安装 samba,但它不起作用。
这里是服务错误消息:
root@srvvm:~# systemctl restart smbd
Job for smbd.service failed because the control process exited with error code.
See "systemctl status smbd.service" and "journalctl -xe" for details.
root@srvvm:~# systemctl status smbd
● smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2017-01-30 17:27:42 CET; 2s ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Process: 3075 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=1/FAILURE)
Main PID: 3075 (code=exited, status=1/FAILURE)
Jan 30 17:27:42 srvvm systemd[1]: Starting Samba SMB Daemon...
Jan 30 17:27:42 srvvm smbd[3075]: [2017/01/30 17:27:42.769054, 0] ../source3/smbd/server.c:1441(main)
Jan 30 17:27:42 srvvm smbd[3075]: server role = 'active directory domain controller' not compatible with running smbd standalone.
Jan 30 17:27:42 srvvm smbd[3075]: You should start 'samba' instead, and it will control starting smbd if required
Jan 30 17:27:42 srvvm systemd[1]: smbd.service: Main process exited, code=exited, status=1/FAILURE
Jan 30 17:27:42 srvvm systemd[1]: Failed to start Samba SMB Daemon.
Jan 30 17:27:42 srvvm systemd[1]: smbd.service: Unit entered failed state.
Jan 30 17:27:42 srvvm systemd[1]: smbd.service: Failed with result 'exit-code'.
答案1
这个问题似乎在 17.04 中仍然存在(至少对我来说)
这对我有用:
sudo systemctl disable nmbd
sudo systemctl disable smbd
sudo systemctl unmask samba-ad-dc
sudo systemctl enable samba-ad-dc