05 Mayıs 2009

LDAP Admin 101

I am being an ldap guy these days so I need to keep track of what's going on.

Dealing with an ldap server (having ten thousands of objects) for 15 minutes and you'll see that a decent ldap client (i.e. Apache Directory Studio or LdapAdmin etc.) is quite painful to move object masses around. You will eventually need the following console commands, ldapsearch,ldapmodify,ldapadd and ldapdelete. These 4 will basically do almost everything you need ...
What I am dealing with currently is Oracle Internet Directory btw.


1. ldapsearch: Best way to count, sort, search and export massive objects.
To find out number of objects under a node, go with:

ldapsearch -h localhost -p 389 -x -s sub -b "cn=Users,dc=example,dc=com" -D "cn=orcladmin" -w welcome1 "objectclass=*" dn > searchMe.txt
This will put all dns under cn=Users to the txt file. You can tail it and see how many records it returns...

will go on this later...

Hiç yorum yok: