testsaslauthd只在第一次编辑文件/etc/saslauthd.conf并重新启动openLDAP时,我第二次运行它,它显示身份validation失败。 当我重新编辑文件并重新启动openLDAP时,它会重复下面的结果。
#testsaslauthd -u testuser -p testPassword 0: OK "Success." # testsaslauthd -u testuser -p testPassword 0: NO "authentication failed"
我的configuration如下
ldap_servers: ldap://10.10.88.103 ldap_search_base: cn=users,dc=ldapcentos,dc=com ldap_filter: (uid=%u)
# Directory in which to place saslauthd's listening socket, pid file, and so # on. This directory must already exist. SOCKETDIR=/var/run/saslauthd # Mechanism to use when checking passwords. Run "saslauthd -v" to get a list # of which mechanism your installation was compiled with the ablity to use. MECH=ldap # Options sent to the saslauthd. If the MECH is other than "pam" uncomment the next line. DAEMONOPTS=--user saslauth # Additional flags to pass to saslauthd on the command line. See saslauthd(8) # for the list of accepted flags. FLAGS="-O /etc/saslauthd.conf"
我发现了这个问题
DAEMONOPTS=--user saslauth ===> DAEMONOPTS="--user saslauth"
还需要确保/var/run/saslauthd可以访问