Utilities to assist with the management of LDAP resources
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
lib/tapjoy
spec
.gitignore
.rspec
.ruby-version
.travis.yml
CHANGELOG.md
Gemfile
Guardfile
LICENSE
README.md
ldap_tools.gemspec

README.md

Gem Version Codacy Badge Gem Build Status

Table of Contents generated with DocToc

LDAP Tools

This LDAP tools gem is designed as a wrapper around Net/LDAP to make interacting with LDAP easier. No knowledge of LDIF required.

Requirements

  • Ruby 2.3
  • Trollop gem
  • Net/LDAP gem

Installation

Installation from rubygems

gem install ldap_tools

Installation from source

git clone git@github.com:Tapjoy/ldap_tools.git
cd ldap_tools
gem build ldap_tools.gemspec
gem install ldap_tools*.gem --no-ri --no-rdoc
cd ..

Configuration

There are two files used by this application. The default location is $HOME/.ldap; however, this can be overridden using the $LDAP_CONFIG_DIR environment variable

ldap_info.yaml

This config file provides basic information about your LDAP server setup.

---
basedn: #LDAP Base DN
servers:
  - # LDAP master servers (one per line)
port: # LDAP port
rootdn: # LDAP root DN
service_ou: # Organization Unit (OU) for service accounts
email_domain: # Domain to be used for user email addresses

ldap.secret

This is a plaintext file with the LDAP root password.

Commands

ldaptools

This is the base command from which all other commands are launched

Usage: ldaptools  [SUB_COMMAND] [options]

Tool to manage LDAP resources.
Available subcommands are: ["user", "group", "key", "audit"]

Options:
  -h, --help    Show this message

Help is available for all subcommands in a similar fashion.

Currently supported subcommands

  • user create
  • user delete
  • group create
  • group delete
  • group add_user
  • group remove_user
  • key add
  • key remove
  • key install
  • audit by_user
  • audit by_group
  • audit raw