0

testsaslauthd only works for first time after i edited the file /etc/saslauthd.conf and restarted openLDAP when i run it the second time, it is showing authentication failed. When i reedited the file and restart openLDAP then it will be repeating the result as below.

#testsaslauthd -u testuser -p testPassword
0: OK "Success."
# testsaslauthd -u testuser -p testPassword
0: NO "authentication failed"

My configuration as below

/etc/saslauthd.conf

ldap_servers: ldap://10.10.88.103
ldap_search_base: cn=users,dc=ldapcentos,dc=com
ldap_filter: (uid=%u)

/etc/sysconfig/saslauthd

# 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"
Loon Yew
  • 11
  • 3

1 Answers1

1

I have found the problem

DAEMONOPTS=--user saslauth ===> DAEMONOPTS="--user saslauth"

also need to make sure /var/run/saslauthd is accessible

Jakuje
  • 9,715
  • 2
  • 42
  • 45
Loon Yew
  • 11
  • 3