我正在尝试在局域网中设置SMB文件夹共享。
[share]
Comment = Pi shared folder
path = /disk1/share
browseable = yes
writeable = yes
create mask = 0777
directory mask = 0777
public= yes
此配置有效。但是,我只希望以pi
用户身份登录才能访问此文件夹:
[share]
Comment = Pi shared folder
path = /disk1/share
browseable = yes
writeable = yes
create mask = 0777
directory mask = 0777
valid users = pi
我为pi设置了密码:sudo smbpasswd -a pi
。然后重新启动服务。
然后,Windows按照预期的方式询问登录名/密码,但提示它无效:the specified network password is not correct
。
这可能是什么问题?
这是我的带有删除注释的smb.conf文件:
usershare allow guests = yes
[homes]
comment = Home Directories
browseable = no
read only = no
create mask = 0700
directory mask = 0700
valid users = %S
[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
browseable = yes
read only = yes
guest ok = no
[share]
Comment = Pi shared folder
path = /disk1/share
browseable = yes
writeable = yes
create mask = 0777
directory mask = 0777
valid users = pi