我更改了 Suse 机器上的 Linux 用户“user123”的密码,并注意到我用来从 Windows 访问其主目录的先前有效的 Samba 登录名并没有随之更改。因此我这样做是为了确保 2 个密码相同:
smbpasswd -x user123; smbpasswd -a user123; smbpasswd -e user123
Failed to find entry for user user123.
New SMB password:
Retype new SMB password:
Added user user123.
Enabled user user123.
之后,我发现我无法再访问该目录 (/home/user123)。当我按下以查看更多详细信息时,Windows 的响应是“我无权访问 \ip.of.samba.share\user123”这是我的 smb.conf 文件:
# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
# Date: 2010-07-05
[global]
workgroup = WORKGROUP
passdb backend = tdbsam
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.9xprofile
logon drive = P:
usershare allow guests = Yes
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = No
domain master = No
security = user
[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = Yes
read only = No
inherit acls = Yes
[profiles]
comment = Network Profiles Service
path = %H
read only = No
store dos attributes = Yes
create mask = 0600
directory mask = 0700
[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/
[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes
[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775
## Share disabled by YaST
# [netlogon]
顺便说一下,我已经重新启动了 Samba:
/etc/init.d/smb restart
Shutting down Samba SMB daemon done
Starting Samba SMB daemon done
有任何想法吗?
答案1
为什么不更改 Windows 中存储的密码?Windows 中存储的密码(如果存储)是用于向 samba 共享验证 Windows 工作站/用户的密码。请尝试更改 Windows 中存储的密码。