
我想讓 Debian 機器上的每個使用者的主目錄只能由其擁有者使用(使用 Samba),但現在(使用預設的 Samba 設定)我可以存取其他使用者/home
。
這是[home]
配置部分:
[homes]
comment = Home Directories
browseable = no
public = no
read only = no
create mask = 0700
directory mask = 0700
valid users = ashley joe %S
透過從 Windows 7 電腦登入 ashley 的帳戶,我可以瀏覽 joe 的主頁。我應該如何配置這個?
答案1
我認為你應該改為valid users = ashley joe %S
only valid users = %S
.在您的範例中,ashley, joe and %S [the name of the share]
始終有效,因此ashley
且joe
可以到達所有家庭,任何其他(如果有)使用者應該只能在您給出的範例中看到自己的使用者。