This is the home page of the LDAP shell (ldapsh), a command line utility to easy administration of LDAP directories content.

This tool is entirely written in perl, based on the excellent module Net::LDAP. It has been tested on Linux/RedHat and on Windows 2000/ActiveState.

You will need:

Optional Perl packages:

It's somewhat well documented (POD embedded documentation) but it's not yet well packaged (some volunteers?). To use it, you should have a good knowledge in Perl, and for advanced features (the change command for example), a good knowledge in Net::LDAP.

With it, you can do things such as (remember, it's a shell):

cd ou=Users
search 'profilepath=*'
change {$_->delete('profilepath') if $_->get_value('department') =~ /(Old|New) NAME/i}
changes
commit

This will:

  1. Change the "working directory" to "OU=Users"
  2. Search all the entries with an existing attribute "profilepath"
  3. Delete the "profilepath" attribute for all entries where the "department" matches /(Old|New) Name/i
  4. Show the changes done
  5. Commit the changes to the server (Net::LDAP::Entry->update)

You can also do "ls", "cd"...
You can ask for help with "help", or typing "<CTRL>-t" after a command ("bind <CTRL>-t") (provided you have Term::ReadLine::Gnu installed).

And a lot of more cool things.

See the HTML documentation (or type perlpod ldapsh).

The distribution have 3 files:

  1. ldapsh: The shell itself. Runs under Unix/Windows provided you have Net::LDAP (and preferably Term::ReadLine::Gnu)
  2. ldapsh.html: The code generated with pod2html
  3. A sample of .ldapshrc (rename it from ldapshrc to .ldapshrc, edit it and put it on your home directory).

Feel free to send comments, suggestions, bug reports, using the SourceForge web forms (see http://sourceforge.net/projects/ldapsh) or sending an e-mail to rcorvalan at users.sourceforge.net.


Rafael Corvalan <rcorvalan at users.sourceforge.net>