我有一个运行了10年的CentOS服务器。 每隔几年我擦一次,安装最新的CentOS,重新configuration所有的服务。 显然,很多硬件也被改变了。
直到最近,这台机器还运行了带有samba 3.x的CentOS 4,并作为Windows XP机器的小型办公networking的PDC。 我擦了擦,安装了最新的CentOS 6和samba 3.6.9。 然后我复制了旧的configuration文件,并调整了任何testparm抱怨。
一切似乎工作正常 – 现有的用户可以login到他们的Windows工作站使用现有的Windows域。
这是一个服务器设置的testparm转储:
[global] workgroup = RRMSC_DOM server string = RRM Primary Domain Controller Samba Server interfaces = 192.168.231.0/24, 10.8.3.0/24 smb passwd file = /etc/samba/smbpasswd passdb backend = smbpasswd log file = /var/log/samba/smbd.log max log size = 50 smb ports = 139 time server = Yes socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192 printcap name = /etc/printcap add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %m$ logon script = logon.bat logon path = \\%L\Profiles\%U domain logons = Yes os level = 255 preferred master = Yes domain master = Yes dns proxy = No wins support = Yes message command = /bin/mail -s 'message from #% on %M< %S; rm %S idmap config * : backend = tdb admin users = root, sdc hosts allow = 192.168.231.0/24, 127.0.0.1, 10.8.3.0/24 cups options = raw
最近我添加了一个新的用户吉姆 。 遵循使用useradd添加此用户并将其添加到与其他用户相同的unix组的标准过程。 我用passwd设置了他的unix密码,用smbpasswd设置了他的samba密码。
但是,我发现jim无法login到办公室的任何一个windows工作站。 在Windows工作站上,您看到消息“login失败:未知的用户名或错误的密码”。
我检查了Windows工作站上的eventvwr,并没有看到任何与login失败相关的内容。
为了在linux服务器端排除故障,我将smb.conf中的日志级别提高到了
log level = 2 auth:10
我在日志中看到这个:
[2013/05/14 20:28:21.994731, 5] auth/auth_util.c:211(make_user_info_map) Mapping user [RRMSC_DOM]\[jim] from workstation [UNCONFINED] [2013/05/14 20:28:21.994754, 5] auth/auth_util.c:122(make_user_info) attempting to make a user_info for jim (jim) [2013/05/14 20:28:21.994773, 5] auth/auth_util.c:132(make_user_info) making strings for jim's user_info struct [2013/05/14 20:28:21.994792, 5] auth/auth_util.c:164(make_user_info) making blobs for jim's user_info struct [2013/05/14 20:28:21.994811, 10] auth/auth_util.c:182(make_user_info) made an encrypted user_info for jim (jim) [2013/05/14 20:28:21.994829, 3] auth/auth.c:216(check_ntlm_password) check_ntlm_password: Checking password for unmapped user [RRMSC_DOM]\[jim]@[UNCONFINED] with the new password interface [2013/05/14 20:28:21.994851, 3] auth/auth.c:219(check_ntlm_password) check_ntlm_password: mapped user is: [RRMSC_DOM]\[jim]@[UNCONFINED] [2013/05/14 20:28:21.994882, 10] auth/auth.c:228(check_ntlm_password) check_ntlm_password: auth_context challenge created by random [2013/05/14 20:28:21.994901, 10] auth/auth.c:230(check_ntlm_password) challenge is: [2013/05/14 20:28:21.994921, 10] auth/auth.c:256(check_ntlm_password) check_ntlm_password: guest had nothing to say [2013/05/14 20:28:21.995773, 4] auth/auth_sam.c:180(sam_account_ok) sam_account_ok: Checking SMB password for user jim [2013/05/14 20:28:21.995816, 5] auth/auth_sam.c:162(logon_hours_ok) logon_hours_ok: user jim allowed to logon at this time (Wed May 15 03:28:21 2013 ) [2013/05/14 20:28:21.996529, 5] auth/auth_util.c:649(make_server_info_sam) make_server_info_sam: made server info for user jim -> jim [2013/05/14 20:28:21.996573, 3] auth/auth.c:265(check_ntlm_password) check_ntlm_password: sam authentication for user [jim] succeeded [2013/05/14 20:28:21.996611, 5] auth/auth.c:291(check_ntlm_password) check_ntlm_password: PAM Account for user [jim] succeeded [2013/05/14 20:28:21.996630, 2] auth/auth.c:304(check_ntlm_password) check_ntlm_password: authentication for user [jim] -> [jim] -> [jim] succeeded [2013/05/14 20:28:21.996652, 5] auth/auth_util.c:2119(free_user_info) attempting to free (and zero) a user_info structure [2013/05/14 20:28:21.996670, 10] auth/auth_util.c:2123(free_user_info) structure was created for jim
特别让我困惑的是authentication for use [jim] succeeded信息。 这似乎表明使用正确的login在服务器上,但他不能login在工作站上。
那么有没有人可以告诉我这里出了什么问题,或者我应该考虑排除其他问题?
请注意,我以前已经将selinux设置为禁用,因此这不是selinux问题。
一些网友build议某种caching可能是怪罪。 基于此,我决定尝试从域中删除工作站并重新添加。
这工作! 一旦我强制工作站清除域并重新添加它,用户jim终于可以login。 Whee!
我猜测你所要做的就是使用这个链接中列出的方法禁用SELinux。 SELinux可能不是CentOS4的一部分。 有一种方法可以使Samba与SELinux一起工作,但这不是微不足道的。