LDAP Shell utils

A little wrapper over ldapsearch command a piece for working with shell wrappers

Installation

gem install ldap-shell-utils

Examples

* lsu --config myldapconfigfile.yml --audit --filter uid=testuser --attributes mail,givenName
* lsu --config myldapconfigfile.yml --filter '(&(uid=testuser)(mail=*@example.com))'

* How to write a simple shell wrapper that can be work with base64 dn for example

  #
  # Find the Distinguished Name for an UID
  #
  __ldap_find_by_uid() {

    [ -s ${LDAP_CONFIG} ] && [ -n "${1}" ] && lsu --config ${LDAP_CONFIG} --filter "(uid=${1})" --attributes dn
  }

To Do

* Testing all this stuff
* Improve flexibility... for example changing the ldap base with a simple command line option

License

Copyright © 2007-2010 Javier Juarez, released under the MIT license.