项目作者: YaleUniversity

项目描述 :
Simple gem to manage active directory computer objects
高级语言: Ruby
项目地址: git://github.com/YaleUniversity/ad_management.git
创建时间: 2017-06-27T19:24:05Z
项目社区:https://github.com/YaleUniversity/ad_management

开源协议:MIT License

下载


Yale ITS ActiveDirectory Management Gem

This gem is a lightweight wrapper for the net-ldap gem. It simplifies connection to Microsoft ActiveDirectory directory services and management of directory objects. There is a AdManagement::Client class to abstract the client connection to LDAP and each managed object can be added as modules under the AdManagement::Objects namespace.

Usage

Installation

Install bundler:

  1. gem install bundler

Create a directory to hold your code, change into the directory and create a new GemFile or edit the existing Gemfile to include the following line:

  1. gem 'ad_management', :git => 'https://git.yale.edu/spinup/ad_management.git'

Edit your code to require the ad_management gem:

  1. require 'ad_management'

Install the ad_management gem by running bundle:

  1. bundle install --path ./vendor/bundle

or

  1. bundle update

The code can the be executed through bundle:

  1. bundle exec ./[your_code].rb

Examples

Example code is contained in the examples folder. Each file illustrates basic usage.

CLI

This gem provides the ad command.

  1. ad help
  2. NAME
  3. ad - Simple active directory object management.
  4. USAGE
  5. ad [command, command, ...] [options] [arguments]
  6. DESCRIPTION
  7. Provides access to active directory objects through the CLI.
  8. COMMANDS
  9. computer manage a computer object
  10. help show help
  11. OPTIONS
  12. --basedn=<value> BaseDN
  13. --config_file=<value> Location of a config (override env/flags)
  14. -h --help show help for this command
  15. --host=<value> Active directory host
  16. --loglevel=<value> Log level (debug|info|warn|error)
  17. --password=<value> Password to use for Active directory bind
  18. --port=<value> Active directory port
  19. --user=<value> Username to use for Active directory bind

Development

Install bundler:

  1. gem install bundler

Clone repository:

  1. git clone https://git.yale.edu/spinup/ad_management.git

Change to project directory:

  1. cd ad_management

Build package

  1. bundle exec rake build

Version

0.1.0

Initial version

0.2.0

Added return values for .delete.

0.3.1

Added return values for .create. Added yardoc comments for methods. Fixed rubocop offenses.

0.4.0

Added .move_computer method

0.4.1

Standardized method returns; empty string returned for unsuccessful operation

1.0.0

Initial release. Converted all method arguments to named keyword arguments. Minor change to .move_computer; if target_cn: of computer to be moved is unspecified, target_cn: defaults to value of source_cn:.

2.0.0

Added a client class and cli components

3.0.0

  • Changed Computer#get to use CN instead of sAMAccountName
  • Fixed Computer#create to create a proper computer object with userAccountControl 4096

4.0.0

Changed Computer#get to return all attributes for a computer object

4.1.0

Added methods for Computer attributes manipulation