無法安裝 samba

無法安裝 samba

我無法安裝 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

相關內容