我使用 samba (3.4) 和 OpenLDAP (2.4) 进行文件共享和目录服务。
几天前,我注意到 samba 在连接到 LDAP 服务时出现问题,而之前它运行正常。但共享目录仍然可以访问。重新启动 smbd 服务后,它不再可访问。因此,网络中的人们无法使用许多必要的文件!有什么帮助吗?
samba日志文件报告:
[2014/01/30 11:21:59, 1] lib/smbldap.c:1265(another_ldap_try)
Connection to LDAP server failed for the 1 try!
[2014/01/30 11:22:00, 1] lib/smbldap.c:1265(another_ldap_try)
Connection to LDAP server failed for the 2 try!
[2014/01/30 11:22:01, 1] lib/smbldap.c:1265(another_ldap_try)
Connection to LDAP server failed for the 3 try!
[2014/01/30 11:22:02, 1] lib/smbldap.c:1265(another_ldap_try)
.
. (the number is just counted up)
.
Connection to LDAP server failed for the 13 try!
[2014/01/30 11:22:12, 1] lib/smbldap.c:1265(another_ldap_try)
Connection to LDAP server failed for the 14 try!
[2014/01/30 11:22:13, 1] lib/smbldap.c:1265(another_ldap_try)
Connection to LDAP server failed for the 15 try!
[2014/01/30 11:22:14, 0] smbd/server.c:1201(main)
ERROR: failed to setup guest info.
[2014/01/30 11:22:14, 0] smbd/server.c:1069(main)
smbd version 3.4.7 started.
Copyright Andrew Tridgell and the Samba Team 1992-2009
[2014/01/30 11:22:14, 0] smbd/server.c:1115(main)
standard input is not a socket, assuming -D option
[2014/01/30 11:22:14, 0] lib/smbldap.c:1086(smbldap_connect_system)
failed to bind to server ldapi:/// with dn="uid=samba,ou=system-accounts,dc=example,dc=com" Error: Invalid credentials
(unknown)
一些相应的系统日志:
Jan 30 14:27:34 atom-lan slapd[2320]: connection_read(24): no connection!
Jan 30 14:27:35 atom-lan winbindd[2872]: [2014/01/30 14:27:35, 0] lib/smbldap.c:656(smbldap_store_state)
Jan 30 14:27:35 atom-lan winbindd[2872]: PANIC: assert failed at lib/smbldap.c(656): tmp_ldap_state == smbldap_state
.
. (repetition)
.
Jan 30 14:42:55 atom-lan init: smbd main process (5977) terminated with status 255
Jan 30 14:42:55 atom-lan init: smbd main process ended, respawning
Jan 30 14:42:55 atom-lan smbd[6037]: [2014/01/30 14:42:55, 0] smbd/server.c:1115(main)
Jan 30 14:42:55 atom-lan smbd[6037]: standard input is not a socket, assuming -D option
Jan 30 14:42:55 atom-lan smbd[6037]: [2014/01/30 14:42:55, 0] lib/smbldap.c:1086(smbldap_connect_system)
Jan 30 14:42:55 atom-lan smbd[6037]: failed to bind to server ldapi:/// with dn="uid=samba,ou=system-accounts,dc=example,dc=com" Error: Invalid credentials
如果需要更多信息,请发表评论,我会更新问题。
答案1
你忘了
# smbpasswd -w PASSWD
samba 要求您保存ldap 管理员 DN在其私有目录中的文件中指定 smb.conf。这是通过前一个命令完成的。
答案2
如果你有特殊字符,比如$或#,你必须使用\$#,如果你输入“”,它也将成为密码的一部分