Ubuntu
Samba 未在 Ubuntu Server 16.10 上啟動
Samba 在 ubuntu 伺服器 14.04 上執行良好。升級到 16.10 後,它不再啟動。我也嘗試在新的 16.10 vm 上安裝 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'.
這個問題似乎在 17.04 中仍然存在(至少對我來說)
這對我有用:
sudo systemctl disable nmbd sudo systemctl disable smbd sudo systemctl unmask samba-ad-dc sudo systemctl enable samba-ad-dc