User Tools

Site Tools


This is an old revision of the document!

LDAP Management

Handy Hints


To look at the LDAP server configuration:

root@marmot:~# ldapsearch -Y EXTERNAL -H ldapi:/// -b "cn=config"

Sometimes it is easier to digest an LDAP directory using a GUI tool, a suitable one I found is jxplorer.

Importing a Schema

Palmed wisdom from Zarafa's LDAP wiki pages:

root@marmot:~# wget
root@marmot:~# echo 'include openssh-lpk_openldap.schema' > schema_convert.conf
root@marmot:~# mkdir /tmp/ldif_output
root@marmot:~# slaptest -f schema_convert.conf -F /tmp/ldif_output
root@marmot:~# sed -n 's/^dn: \(.*\)/dn: \1,cn=schema,cn=config/; s/{[0-9]\+}//; /^\(dn\|objectClass\|cn\|olcAttributeTypes\|olcObjectClasses\| \)/ p' /tmp/ldif_output/cn\=config/cn\=schema/cn\=\{0\}openssh-lpk_openldap.ldif > ~/import.ldif
root@marmot:~# ldapadd -Y EXTERNAL -H ldapi:/// -f ~/import.ldif
SASL/EXTERNAL authentication started
SASL username: gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth
adding new entry "cn=openssh-lpk_openldap,cn=schema,cn=config"

Editing Data Directly

root@marmot:~# ldapvi -Y EXTERNAL -h ldapi:/// -b "cn=config"
ldap.1317724241.txt.gz · Last modified: 2011/10/04 11:30 by alex