Puppet: System Administration Automated

Support

This is an LDAP shell. It hasn't been updated in a good while, partially because I don't manage LDAP as much any more and partially because I don't write much perl any more. It still works well, though, and I do still use it when I need access to an LDAP server.

It is composed of two parts: Net::LDAP::Config, and ldapsh.

Net::LDAP::Config is a library for simplifying and centralizing access to your LDAP repositories. Instead of having every single script ask for your ldap server and search base, or have it hard coded, you can simply use this library:

my $config = Net::LDAP::Config->new("default");

It's got a couple other nice features, like the fact that it caches your LDAP UID (per host), so you should only ever have to type it in once. It's pretty well documented, so 'perldoc Net::LDAP::config' should get you the rest of the way.

ldapsh, and its corresponding library Net::LDAP::Shell, provide (shockingly) the shell behaviour. When run, ldapsh drops you into a (very simple) interpreter. Even given its simplicity, though, ldapsh is still very useful: You can use it to walk your LDAP tree, you can clone existing objects (using the 'clone' command), remove objects (can you guess the command?), and create new objects using 'new'. The 'new' command, when provided one or more objectclasses, will automatically retrieve the required and optional attributes for those objectclasses, which can be a great time-saver.

You can download the most recent copy here.