为什么我的Mac无法validation我的SAMBA文件共享服务器?

我最近设置了一个SAMBA文件共享。 经过一系列的步骤后,我终于可以让大部分电脑看到这个服务器。 主要要求是:1)必须有密码保护,2)有多个用户,3)每个用户可以拥有一个文件,但是所有的用户都可以写对方的文件。

我的办公室里有5台Mac,1台Linux服务器(Ubuntu 13.04),1台Windows Server(Windows 2008 R2)和3台Windows XP Pro台式机。 所有电脑都可以正确访问共享,除了Mac电脑。

奇怪的是,一个Mac可以查看共享和login。 所有其他Mac在input用户名和密码后都无法login。

这里是我的smb.conf文件的内容:

[global] workgroup = workgroup server string = %h server (Samba, Ubuntu) dns proxy = no log file = /var/log/samba/log.%m max log size = 1000 syslog = 0 panic action = /usr/share/samba/panic-action %d security = user encrypt passwords = yes obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . pam password change = yes map to guest = bad user usershare allow guests = yes username map = /etc/samba/smbusers guest ok = no guest account = nobody comment = Home Directories browseable = no read only = no create mask = 0775 directory mask = 0775 [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 [interactive] path = /home/shok07a/interactive writeable = yes browseable = yes comment = interactive create mask = 0777 directory mask = 2777 force directory mode = 2777 guest ok = no force group = sambashare 

日志:

开始log.nmbd:

 [2013/08/26 08:51:27.730313, 0] nmbd/nmbd_nameregister.c:492(register_name) register_name: NetBIOS name SHOK07A-INTERACTIVE-SERVER is too long. Truncating to SHOK07A-INTERAC [2013/08/26 08:51:27.730464, 0] nmbd/nmbd_nameregister.c:492(register_name) register_name: NetBIOS name SHOK07A-INTERACTIVE-SERVER is too long. Truncating to SHOK07A-INTERAC [2013/08/26 08:51:27.730526, 0] nmbd/nmbd_nameregister.c:492(register_name) register_name: NetBIOS name SHOK07A-INTERACTIVE-SERVER is too long. Truncating to SHOK07A-INTERAC [2013/08/26 08:53:02.002178, 0] nmbd/nmbd_become_lmb.c:397(become_local_master_stage2) ***** Samba name server SHOK07A-INTERACTIVE-SERVER is now a local master browser for workgroup WORKGROUP on subnet 10.42.0.1 ***** [2013/08/26 16:45:47.916574, 0] libsmb/nmblib.c:856(send_udp) Packet send failed to 10.42.0.255(138) ERRNO=Invalid argument [2013/08/26 16:45:47.916689, 0] libsmb/nmblib.c:856(send_udp) Packet send failed to 10.42.0.255(138) ERRNO=Invalid argument [2013/08/26 16:58:56.608481, 0] nmbd/nmbd_incomingdgrams.c:311(process_local_master_announce) process_local_master_announce: Server SHOK09A-PC at IP 10.42.0.92 is announcing itself as a local master browser for workgroup WORKGROUP and we think we are master. Forcing election. [2013/08/26 16:58:56.608685, 0] nmbd/nmbd_become_lmb.c:150(unbecome_local_master_success) ***** Samba name server SHOK07A-INTERACTIVE-SERVER has stopped being a local master browser for workgroup WORKGROUP on subnet 192.168.1.35 ***** [2013/08/26 16:58:56.609163, 0] nmbd/nmbd_nameregister.c:492(register_name) register_name: NetBIOS name SHOK07A-INTERACTIVE-SERVER is too long. Truncating to SHOK07A-INTERAC [2013/08/26 16:58:56.609241, 0] nmbd/nmbd_nameregister.c:492(register_name) register_name: NetBIOS name SHOK07A-INTERACTIVE-SERVER is too long. Truncating to SHOK07A-INTERAC [2013/08/26 16:58:56.609334, 0] nmbd/nmbd_nameregister.c:492(register_name) register_name: NetBIOS name SHOK07A-INTERACTIVE-SERVER is too long. Truncating to SHOK07A-INTERAC [2013/08/26 16:59:13.629340, 0] nmbd/nmbd_become_lmb.c:397(become_local_master_stage2) ***** Samba name server SHOK07A-INTERACTIVE-SERVER is now a local master browser for workgroup WORKGROUP on subnet 192.168.1.35 ***** 

结束log.nmbd

没有其他日志显示任何东西。 他们是空的。 无论如何,我保存了他们,清除日志,并试图再次连接。 我的日志里再也没有出现过。

我从苹果机上ping了机器,所有的ping都通过了。 我被提示input用户名和密码。

所以看起来机器可以“看”对方,但authentication失败。

编辑(更多日志):

 [2013/08/27 09:28:29.864230, 2] smbd/reply.c:553(reply_special) netbios connect: name1=192.168.1.35 0x20 name2=STATION-4 0x0 [2013/08/27 09:28:29.864427, 2] smbd/reply.c:573(reply_special) netbios connect: local=192.168.1.35 remote=station-4, name type = 0 [2013/08/27 09:34:29.843796, 2] smbd/reply.c:553(reply_special) netbios connect: name1=192.168.1.35 0x20 name2=STATION-4 0x0 [2013/08/27 09:34:29.844328, 2] smbd/reply.c:573(reply_special) netbios connect: local=192.168.1.35 remote=station-4, name type = 0 [2013/08/27 09:40:29.850174, 2] smbd/reply.c:553(reply_special) netbios connect: name1=192.168.1.35 0x20 name2=STATION-4 0x0 [2013/08/27 09:40:29.850389, 2] smbd/reply.c:573(reply_special) netbios connect: local=192.168.1.35 remote=station-4, name type = 0 

电台4是无法连接的Mac之一。

开始log.smbd

 [2013/08/27 09:25:40, 0] smbd/server.c:1026(main) smbd version 3.6.9 started. Copyright Andrew Tridgell and the Samba Team 1992-2011 [2013/08/27 09:25:40, 2] lib/tallocmsg.c:124(register_msg_pool_usage) Registered MSG_REQ_POOL_USAGE [2013/08/27 09:25:40, 2] lib/dmallocmsg.c:78(register_dmalloc_msgs) Registered MSG_REQ_DMALLOC_MARK and LOG_CHANGED [2013/08/27 09:25:40.140866, 2] param/loadparm.c:4985(max_open_files) rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384) [2013/08/27 09:25:40.141089, 2] param/loadparm.c:8327(do_section) Processing section "[printers]" [2013/08/27 09:25:40.141181, 2] param/loadparm.c:8327(do_section) Processing section "[print$]" [2013/08/27 09:25:40.141246, 2] param/loadparm.c:8327(do_section) Processing section "[interactive]" [2013/08/27 09:25:40.141494, 2] lib/interface.c:341(add_interface) added interface wlan0 ip=fe80::6a94:23ff:feb3:3a9b%wlan0 bcast=fe80::ffff:ffff:ffff:ffff%wlan0 netmask=ffff:ffff:ffff:ffff:: [2013/08/27 09:25:40.141605, 2] lib/interface.c:341(add_interface) added interface eth0 ip=fe80::7a45:c4ff:fe06:2876%eth0 bcast=fe80::ffff:ffff:ffff:ffff%eth0 netmask=ffff:ffff:ffff:ffff:: [2013/08/27 09:25:40.141655, 2] lib/interface.c:341(add_interface) added interface wlan0 ip=192.168.1.35 bcast=192.168.1.255 netmask=255.255.255.0 [2013/08/27 09:25:40.141688, 2] lib/interface.c:341(add_interface) added interface eth0 ip=10.42.0.1 bcast=10.42.0.255 netmask=255.255.255.0 [2013/08/27 09:25:40.141783, 0] smbd/server.c:1082(main) standard input is not a socket, assuming -D option [2013/08/27 09:25:40.147336, 2] smbd/server.c:815(smbd_parent_loop) waiting for connections [2013/08/27 09:25:40.151155, 2] rpc_client/cli_winreg_spoolss.c:896(winreg_create_printer) winreg_create_printer: Skipping, SOFTWARE\Microsoft\Windows NT\CurrentVersion\Print\Printers\Officejet_7500_E910__4C53E0_ already exists [2013/08/27 09:25:40.151234, 2] smbd/server.c:301(remove_child_pid) Could not find child 25727 -- ignoring 

结束log.smbd

编辑这里是最相对的日志:

 2013/08/27 10:37:45.149211, 2] auth/auth.c:319(check_ntlm_password) check_ntlm_password: Authentication for user [shok10a] -> [shok10a] FAILED with error NT_STATUS_WRONG_PASSWORD 

但是,密码没有错。

似乎没有人能回答这个问题。 经过一番彻底的阅读后,似乎这个问题很可能与OS X如何使用SAMBA(LM,NTLM,NTLMV2)validation密码有关。

由于有些Mac能够连接而其他Mac不能连接,所以我决定只安装Netatalk并为所有的Mac使用AFP协议。

虽然这使得pipe理起来有点麻烦,因为我不得不担心两个文件共享系统的设置,但似乎工作正常。 理想情况下,简单地使用SAMBA会更好一些,但是我读到的所有资源都说,我需要在Mac机器上运行特定的脚本,以允许它们以纯文本forms传递密码(默认情况下,密码是禁用的)。

所以你有它:如果你有这个问题,请查阅有关设置Netatalk的教程。 无论如何,它可能会比Mac上的SAMBA快一点。

更新:这是雪豹的一个问题。 因为苹果不再积极地开发AFP,所以OS X(小牛等)的更新版本本身使用SAMBA。 将所有机器升级到Mavericks后,我可以摆脱AFP,现在所有的机器都使用SMB。