OpenLDAP Server

  • Install OpenLDAP
apt-get install slapd ldap-utils
dpkg-reconfigure slapd

Now it's time to populate LDAP with some data. Use a migration script if you have a lot of Unix accounts somewhere. A simple example would be:

dn: uid=USERNAME,ou=People,dc=example,dc=com
uid: USERNAME
sn: LAST
givenName: FIRST
cn: FIRST LAST
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount
userPassword: {crypt}1R14waNZxBjGS
shadowLastChange: 12345
loginShell: /bin/bash
uidNumber: 12345
gidNumber: 1234
homeDirectory: /home/USERNAME
gecos: FIRST LAST
mail: USERNAME@eng.fsu.edu
  • Configure server as an LDAP client if desired
apt-get install libnss-ldap libpam-foreground
auth-client-config -t nss -p lac_ldap
pam-auth-update
  • Reconfigure if necessary
dpkg-reconfigure libnss-ldap
Back to top
ubuntu/openldap-server.txt · Last modified: 2009/08/19 10:23 by sainth