Vagrant must be installed to use this setup. I'm using Virtualbox as the back-end.
Running vagrant up
will provision the two boxes necessary for this test. One running node with an authenticate-pam example, and one running an openldap server. The node box is configured to use PAM to defer to the LDAP server for auth.
Now SSH into the node box using vagrant ssh node
, cd /vagrant
.
Now run the index.js file sudo node index.js
. In the first commit of this project (using an older version of authenticate-pam) you'll see a segmentation fault. Now you no longer see the segfault, but the inner callback from authenticate never gets called (i.e. there's no output when running the command).
You shouldn't have to run this command, but if you get an error like "Auth failed -- User not known to the underlying authentication module", this command will resolve it.
sudo authconfig --enableldap --enableldapauth --ldapserver="openldap:389" --ldapbasedn="ou=People,dc=ssp-openldap" --update