好的,过去几天我一直在阅读有关 Samba 共享等的信息,但仍然无法让它工作。
我已经使公共共享和私人用户共享能够工作,但是群组共享还不能工作。
[global]
workgroup = WORKGROUP
log file = /var/log/samba/log.%m
max log size = 1000
syslog = 0
map to guest = bad user
#state directory = /var/lib/samba
#usershare path = /var/lib/samba/usershares
[public]
comment = public share
path = /srv/abc/public
browsable = yes
writable = yes
ready only = no
guest ok = yes
create mask = 0777
create directory = 0777
[private]
comment = private share
path = /srv/abc/private
browsable = yes
writable = yes
security = user
valid users = test
ready only = no
guest ok = no
create mask = 0777
create directory = 0777
[mygroup]
comment = mygroup server files
path = /srv/mygroup
browsable = yes
writable = yes
security = user
valid users = @mygroup
force group = mygroup
ready only = no
guest ok = no
create mask = 0777
create directory = 0777
force create mode = 0777
force security mode = 0777
force directory mode = 0777
我完成了以下操作来添加用户和组。
sudo useradd karl
sudo passwd karl
sudo groupadd mygroup
sudo usermod -a -G mygroup karl
sudo smbpasswd -a karl
sudo mkdir /srv/mygroup
sudo chmod 777 /srv/mygroup
sudo chgrp mygroup /srv/mygroup
我仍然无法通过 Windows 8 登录。
答案1
两天后我发现了这篇可爱的帖子:https://serverfault.com/questions/549289/the-network-folder-specified-is-currently-mapped-using-a-different-user-name-andWindows 无法在每个服务器上处理多个用户名。
您创建一个帐户并调整所有权限进入 Windows hosts 文件并创建指向同一 IP 的多个主机名(有效引诱 Windows)