Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
An wrapper for OpenLDAP ldapsearch command
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
bin
config
lib
Gemfile
Gemfile.lock
README.rdoc
Rakefile

README.rdoc

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.

Something went wrong with that request. Please try again.