Home
About Me
Articles
Projects
Downloads
Java Quiz
Useful Links

LDAPsh : Shell for LDAP trees


LDAPsh offers a basic shell to traverse the LDAP trees. The commands supported include -

  1. Connecting on non-ssl port (389)
  2. Changing directory context
  3. Listing entries from a LDAP tree
  4. searching with filters on a LDAP tree
  5. Viewing entries
  6. Editing Entries
  7. Configuring custom editors for editing entries
  8. Profile configuration (Save the current profile with a name and use the profile to connect to the server next time)

Configuration

This application uses JSHELL. The current build (0.1) of JSHELL is already bundled with LDAPsh. If you try to build from source, here are the steps to configure ldapsh :
  1. Set the classpath to include ldapsh.jar
  2. Edit config.xml to include the commands you need from ldapsh.jar (Refer to the default-config.xml)
  3. Start up the jshell.

Usage

Command

Options / Args

Usage

connect -s <serverName>
-u <user>
-p <password>
-r <profile>
With host/username/password
connect -u somewhere.com -u somebody -p nobody
With profile
connect -r myprofile
list   list [path] :Lists entries in the path. If no path is specified, all entries in the current context are listed
pwd   pwd : Displays current context
saveProfile   saveProfile [prof-name]: saves the connection paramters (user, password , host and preferred editor) in a profile.If no argument is specified, its stored as "default"
search   search <path> <filter> <level>: Searches the "path" using the filter. If the "level" argument is set to subtree, the search scope is "SUBTREE", else it is set to a one-level search
view   view <entry>: Shows the attributes of the entry
edit   edit <entry>: Opens the editor configured with the entry specified
rm   rm <entry>: Deletes the entry
set   set <property_name>=<property_value>: Saves the property in the environment. All properties in the environment are saved by the "saveProfile" Command

Dependencies

The framework uses jshell. This in turn results in a chain of dependencies. Below is the list and the versions used in the build

Library Version
common-digester 1.5
Apache XML parser 2.6.2
Bean-Utils 1.6
common-collections 2.1
common-logging 1.0.3
Sun JNDI implementation for LDAP 1.2.1

Downloads

Site hosted by Angelfire.com: Build your free website today!