Authenticate Using SASL and LDAP with ActiveDirectory

341 views
Skip to first unread message

MongoFan

unread,
Jun 12, 2016, 4:19:09 PM6/12/16
to mongodb-user
Hi ,

I am using mongoDB 3.2 version and trying to configure SASL and LDAP with Active Direcory.
When I am trying to configure mentioned on mongo doc : https://docs.mongodb.com/manual/tutorial/configure-ldap-sasl-activedirectory/

I have configured the saslauthd.conf file as below:

ldap_servers: <ldap uri>
ldap_use_sasl: yes
ldap_mech: DIGEST-MD5
ldap_auth_method: fastbind

and trying to test my connectivity :
testsaslauthd -u <my user> -p <AD password> -f /var/run/saslauthd/mux
0:No "authentication failed"

tail -10 /var/log/messages
saslauthd[]: No worthy mechs found
saslauthd[]: do_auth : auth failure : [user=<user_name>] [service=imap] [realm=] [mech=ldap] [reason=unknown]

But when I provide my AD userID and Password to the saslauthd conf file, it works and authenticate against mongodb external database user:
cat /etc/saslauthd.conf
ldap_servers: <ldap uri>
ldap_search_base: dc=some,dc=example,dc=com
ldap_mech: DIGEST-MD5
ldap_bind_dn: cn=my user name,ou=some,dc=example,dc=com
ldap_password: <AD password>

testsaslauthd -u <my user> -p <AD password> -f /var/run/saslauthd/mux
OK "success"


What is wrong I am doing here ? 
If I want to configure auth for multiple user, how do I achieve this ?


Reply all
Reply to author
Forward
0 new messages