我无法安装 samba。当我尝试通过此命令“sudo apt-get install samba4”安装 samba 时,出现以下错误。
ERROR: Invalid smb.conf
/var/lib/dpkg/info/samba4.postinst: 14: /var/lib/dpkg/info/samba4.postinst: /usr/share/samba/setoption.pl: Permission denied
dpkg: error processing samba4 (--configure):
subprocess installed post-installation script returned error exit status 126
No apport report written because MaxReports is reached already
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
samba4
E: Sub-process /usr/bin/dpkg returned an error code (1)"
我正在使用 ubuntu tiguin。
答案1
尝试将当前的 smb.conf 重命名为 smb.conf.bak,然后重试安装。
之后,我建议将新的 smb.conf 与 smb.conf.bak 进行差异比较以保留以前的设置。
sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.bak