Fork me on GitHub

Setting up LDAP for user authentication

OpenLDAP was already installed on my server.

I started LDAP by
slapd -h ldap:///

I than set it up by
ldapadd -x -h localhost -D cn=Manager,dc=epl,dc=willspics,dc=com -w secret -f users.ldif

Where the contents of my users.ldif file is
====
dn: ou=people,dc=epl,dc=willspics,dc=com
objectclass: organizationalUnit
ou: people

dn: uid=wmerna01,ou=people,dc=epl,dc=willspics,dc=com
cn: Will Mernagh
sn: Mernagh
givenname: Will
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
ou: comp190Team2
ou: People
l: Tufts
uid: wmerna01
mail: wmerna01@cs.tufts.edu
userpassword: xxxxxx
===

That is it. I can now browse it using phpLDAPadmin

Tags: sys-admin, ldap

blog comments powered by Disqus