升级到 16.04 后 Samba 无法启动

升级到 16.04 后 Samba 无法启动

我已经顺利升级到 16.04,除了 Samba 无法启动之外一切正常:

$ sudo /etc/init.d/smbd status
● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
   Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)
   Active: failed (Result: exit-code) since Mon 2016-04-25 21:43:03 EET; 23min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 1954 ExecStart=/etc/init.d/smbd start (code=exited, status=1/FAILURE)

Apr 25 21:43:02 home systemd[1]: Starting LSB: start Samba SMB/CIFS daemon (smbd)...
Apr 25 21:43:03 home smbd[1954]:  * Starting SMB/CIFS daemon smbd
Apr 25 21:43:03 home smbd[1954]:    ...fail!
Apr 25 21:43:03 home systemd[1]: smbd.service: Control process exited, code=exited status=1
Apr 25 21:43:03 home systemd[1]: Failed to start LSB: start Samba SMB/CIFS daemon (smbd).
Apr 25 21:43:03 home systemd[1]: smbd.service: Unit entered failed state.
Apr 25 21:43:03 home systemd[1]: smbd.service: Failed with result 'exit-code'.

升级后我没有改变任何配置,我只需要保留 15.10 的功能。我重启了好几次,但都没有成功。

更新1:我清除了 samba 并尝试重新安装,但出现以下错误:

Errors were encountered while processing:
 samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
Failed to perform requested operation on package.  Trying to recover:
Setting up samba (2:4.3.8+dfsg-0ubuntu1) ...
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 "start" failed.
dpkg: error processing package samba (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu3) ...
Errors were encountered while processing:
 samba

看起来 16.04 软件包有一个坏的安装后脚本?

任何提示/技巧都值得赞赏。

答案1

security = share从我的个人电脑中删除smb.conf而不重新安装并运行systemctl restart smbd.service,为我解决了这个问题。

答案2

升级到 16.04 后我遇到了同样的问题,首先显示许多与您类似的错误,如下所示:

dpkg: error processing package samba (--configure)

将软件源更改为 ubuntu 主服务器后,我可以重新安装 samba 和以下命令而不会出现错误:

sudo /etc/init.d/smbd status
sudo apt-get install libnss-winbind* libpam-winbind* samba* winbind*

因为samba的卸载是--purge,所以我的旧smb.conf被删除了,它生成了一个新的,我想在我编辑它之后,就不会有问题了。

答案3

我遇到了同样的问题。注释掉此行security = share。然后重新启动 smdb 服务,它又可以正常工作了。

相关内容