Skip to main content

msad is a library and commandline for interacting with Active Directory

Project description

msAD

msad is a library and command line tool for working with an Active Directory / LDAP server. It can be used for:

  • search objects (users, groups, computers,..)
  • search group members
  • add/remove members to/from AD groups using DN or sAMaccoutName
  • change AD passwords
  • check if a user is disabled or locked, group membership

Install

pip install msad

Usage

I find useful to add an alias in my ~/.bash_aliases

alias msad='/usr/local/bin/msad --host=dmc1it.group.redaelli.org --port=636 --search_base dc=group,dc=redaelli,dc=org'

Retreive info about a user

msad check_user matteo 90 \[qliksense_analyzer,qliksense_professional\] 2>/dev/null
{"is_disabled": false}
{"is_locked": false}
{"has_never_expires_password": false}
{"has_expired_password": false}
{"membership_qliksense_analyzer": false}
{"membership_qliksense_professional": true}

License

Copyright © 2021 Matteo Redaelli

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

msad-0.1.5.tar.gz (19.4 kB view hashes)

Uploaded Source

Built Distributions

msad-0.1.5-py3.9.egg (25.0 kB view hashes)

Uploaded Source

msad-0.1.5-py3-none-any.whl (24.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page