Homework 1.6: Enabling LDAP Authentication on a Replica Set

  1. Downloaded the hand out and setup LDAP in infrastructure server
  2. Configured saslauthd
  3. Fixed permissions

Now ,i tried to test connectivity by running testsaslauthd , but getting the following error
vagrant@database:~/shared/ldap$ testsaslauthd -u adam -p password -f /var/run/saslauthd/mux
connect() : Permission denied

Here is my /etc/saslauthd.conf file
ldap_server: ldap://infrastructure.m310.mongodb.university:389
ldap_search_base: ou=Users,dc=mongodb,dc=com
ldap_filter: (cn=%u)

What maybe the issue ?

Seems permission issues
Have you run
sudo chmod 755 /var/run/saslauthd/

Thanks for the response . .Yes , did run that .
drwxr-xr-x 2 root sasl 40 Oct 27 03:27 saslauthd
Then when i start the service
vagrant@database:~$ sudo service saslauthd start

  • Starting SASL Authentication Daemon saslauthd OK ]
    Its changing the permission back to
    drwx–x— 2 root sasl 140 Oct 27 03:27 saslauthd

Is that my problem . I changed it and retried testsaslauthd getting same error.

Not sure when starting saslauthd , why its changing the permission back to the original for saslauthd . Is that my issue ?


Yes everytime you start sslauthd you have to change the permissions

Please check the param ldap_server

It should be ldap_servers

1 Like

Yes , that was it . Thanks for your time .
vagrant@database:/etc$ testsaslauthd -u adam -p password -f /var/run/saslauthd/mux
0: OK “Success.”