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

This was written to report on the progress of a complicated group membership migration

Notifications You must be signed in to change notification settings

PhilGrayson/ldap-group-missing-users

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Generate a list of users who belong to one LDAP group but not another.

This was written to report on the progress of a complicated group membership migration.

This repo won't be maintained. It's published to share some code, maybe you can use this as a starting point for your own reporting needs.

Usage

  1. Build the docker image
docker build -t missing-members .
  1. Create a file called env with the following contents:
LDAP_HOST=<the ldap server address / hostname>
LDAP_USER=<ldap auth name, eg a samAccountName, cnommon name etc)
LDAP_PASSWORD=<ldap auth password>
OLD_GROUP=<The common name of the old group. Can be comma seperated>
NEW_GROUP=<The common name of the new group. Can be comma seperated>
  1. Run the script docker run --rm --env-file env missing-members

Example

For the given env file:

LDAP_HOST=foo
LDAP_USER=foo
LDAP_PASSWORD=foo
OLD_GROUP=group-about-to-be-decomissioned
NEW_GROUP=Jenkins-User,Jenkins-Admin

running the script outputs:

92 users in the original group(s), 2 missing users (2% reduction)
  CN=John Smith,OU=Users,DC=example,DC=com
  CN=Jane Smith,OU=Users,DC=example,DC=com

Now you know that John and Jane do not belong to either Jenkins-User or Jenkins-Admin group.

About

This was written to report on the progress of a complicated group membership migration

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published