我的服务器上配置了 Samba 服务器。我有主帐户 ( nacho
) 和另一个帐户 (`brother)。
我已经为两者设置了 Samba 密码smbpasswd
。
我可以使用我的账户访问股票,nacho
但不能使用我的brother
账户。
我不知道什么地方出了问题?
nacho@desk:~$ sudo testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed by GnuTLS (e.g. NTLM as a compatibility fallback)
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
# Global parameters
[global]
log file = /var/log/samba/log.%m
logging = file
map to guest = Bad User
max log size = 1000
obey pam restrictions = Yes
pam password change = Yes
panic action = /usr/share/samba/panic-action %d
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
passwd program = /usr/bin/passwd %u
registry shares = Yes
server role = standalone server
unix password sync = Yes
usershare allow guests = Yes
idmap config * : backend = tdb
[scans]
inherit acls = Yes
path = /home/nacho/brother scans
read only = No
valid users = brother nacho
[data]
inherit acls = Yes
path = /data
read only = No
valid users = nacho
nacho@desk:~$ cat /etc/passwd | grep -i brother
brother:x:1001:1001:brother,,,:/home/brother:/usr/sbin/nologin
/home/$USER,在本例中为 /home/nacho,在 ubuntu 中现在拥有 750 的权限,因此只有 nacho 可以访问其以外的任何内容。
有几个选择:
设置主文件夹的权限,以便其他人至少可以遍历它来到达共享目录:
在您的主文件夹之外创建共享文件夹...比如在 /media/brother 下...
更改您的共享定义,以便在传递 brother 的正确凭据后, “brother”用户显示为“nacho” :