我在 Linux 机器上使用 webmin 设置了一些 Samba 共享。我可以使用任何 Windows 机器正常访问它们,但是当我使用 osx 连接到服务器时,finder 提示我输入用户名和密码,然后告诉我不行。与 Windows 相比,osx 是否需要设置某些特定内容才能访问共享?
笔记: 在我输入我的凭证后,它会显示共享,但是当我选择其中任何一个时,它会给我一个连接到服务器的一般错误消息。
我的smb.conf如下:
[global]
log file = /var/log/samba/samba.log
guest account = nobody
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
add group script = /usr/sbin/groupadd '%g'
admin users = root
obey pam restrictions = yes
delete group script = /usr/sbin/groupdel '%g'
socket options = TCP_NODELAY
add user to group script = /usr/sbin/usermod -G '%g' '%u'
encrypt passwords = yes
passdb backend = tdbsam
passwd program = /usr/bin/passwd %u
wins support = true
dns proxy = no
netbios name = FILESERVER
server string = Company FileServer
unix password sync = yes
workgroup = OfficeWG
os level = 20
add user script = /usr/sbin/useradd -m '%u' -g users -G users
auto services = global
security = share
syslog = 0
panic action = /usr/share/samba/panic-action %d
delete user script = /usr/sbin/userdel -r '%u'
max log size = 1000
pam password change = yes
[officemain]
writeable = yes
path = /mainstorage/officemain
[homes]
browseable = no
comment = Home Directory
writeable = yes
path = /mainstorage/home/%S
[markshome]
browseable = no
comment = Marks Home Folder
writeable = yes
path = /mainstorage/home/markepstien
我已清除 Samba 日志并尝试重新连接。以下是日志的内容。我看到它显示密码错误,但我可以使用 Windows 机器上的用户/密码正常连接。
[2013/05/06 14:57:52.261776, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:52.263770, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:52.264188, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:52.266115, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:52.268249, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:52.271604, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:55.265867, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:55.267877, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:55.268336, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:55.270168, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:55.272388, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:57:55.275714, 0] printing/print_cups.c:108(cups_connect)
Unable to connect to CUPS server localhost:631 - Connection refused
[2013/05/06 14:58:02.073941, 1] smbd/service.c:678(make_connection_snum)
create_connection_server_info failed: NT_STATUS_WRONG_PASSWORD
[2013/05/06 14:58:02.076238, 1] smbd/service.c:678(make_connection_snum)
create_connection_server_info failed: NT_STATUS_WRONG_PASSWORD
[2013/05/06 14:58:08.104229, 0] param/loadparm.c:8445(check_usershare_stat)
check_usershare_stat: file /var/lib/samba/usershares/ owned by uid 0 is not a regular file
答案1
问题出在你的security = share
设置上。我遇到过类似的情况,我的 OS X 客户端无法连接到我的 Samba 共享。我通过使用以下方法解决了这个问题security = user
答案2
我遇到了这个问题,并通过确保共享目录归 samba 用户所有并且该目录的 mod 为 774 解决了它。
答案3
我也遇到了同样的问题。我通过删除该valid users = %S
语句解决了这个问题。
答案4
原来是 smbd.conf 文件的全局部分出了问题。我删除了全局部分中的所有内容,然后用 workgroup = officeWG 替换它,然后一切在 osx 上开始正常工作。