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}
Getting nested group members (it is a pages search, it can retreive more than 1000 users)
msad --out_format csv --attributes samaccountname,mail,sn,givenName group_flat_members "dc=group,dc=redaelli,dc=org" --group_name "qliksense_admin"
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
Built Distributions
File details
Details for the file msad-0.2.1.tar.gz
.
File metadata
- Download URL: msad-0.2.1.tar.gz
- Upload date:
- Size: 19.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 72d32c2fe63cd7857c150d96c4ba513df3f079249aba4745cb30a79851ec46c0 |
|
MD5 | 798df6d70cad07b914d2bcdd03922760 |
|
BLAKE2b-256 | 8797262af22b788453420c5fdb98458753ee7f43dafa125b8e8461bde99e3242 |
File details
Details for the file msad-0.2.1-py3.10.egg
.
File metadata
- Download URL: msad-0.2.1-py3.10.egg
- Upload date:
- Size: 25.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9de93b6bcf52af88b626867abff679718bf14264fe64aa3441ee4c4389e4918a |
|
MD5 | 701d475faf2b2e428529370750863b47 |
|
BLAKE2b-256 | 88b00187332d4f2c6c0c7828a020df3a882cb8661fd0da62b134467835cf27ff |
File details
Details for the file msad-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: msad-0.2.1-py3-none-any.whl
- Upload date:
- Size: 25.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03d17a6e676bba3f290de1e560d02237962ebf4acbdc086022002a8dc63cc40d |
|
MD5 | 6ff0b813f4176186d1950db99ebc1db2 |
|
BLAKE2b-256 | efef0a467d7a50b945042894e561b46611a68efe112fa14b56c24ed2477b35da |