Skip to content
This repository has been archived by the owner on Jan 7, 2018. It is now read-only.

jjuarez/ldap-shell-utils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

An wrapper for OpenLDAP ldapsearch command

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages