Skip to main content

msad is a 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 from Unix, Linux and MacOs systems.

It supports authentication with user/pwd and kerberos

It supports paginations: it can retreive more than 2000 objects (a limit of AD)

Features:

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

Prerequisites

python >= 3.11

For kerboros auth

  • krb5 lib and tools (like kinit, ...)
  • a keytab file or krb5.conf configured

Installation

pipx install msad

Configuration

Create a configuration file in $HOME/.msad.toml as suggested by

msad get-sample-config

Usage

msad --help

python -m msad --help

For kerberos authentication, first you need to login to AD / get a ticket kerberos with

kinit # or kinit myaduser 
msad search "(samaccountname=matteo)"  --out-format=json # show all attributes

msad search "(cn=redaelli*)" --attributes mail --attributes samaccountname --out-format=json

msad group-members qlik_analyzer_users --nested

msad group-add-member qlik_analyzer_users matteo

msad group-remove-member qlik_analyzer_users matteo

msad user-groups matteo --nested

License

Copyright © 2021 - 2025 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.4.1.tar.gz (13.3 MB view details)

Uploaded Source

Built Distribution

msad-0.4.1-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file msad-0.4.1.tar.gz.

File metadata

  • Download URL: msad-0.4.1.tar.gz
  • Upload date:
  • Size: 13.3 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for msad-0.4.1.tar.gz
Algorithm Hash digest
SHA256 a988256772a8d34dd8b0d925f6ffebf7841161e023fb81fc3aeaf079fc4fd19a
MD5 8ab213f45379c92c8f7bd595faa0ebd1
BLAKE2b-256 dcb00edd2db7990141d24484b976e3c934c44cfb808f69a1ad5b5afe2cc36280

See more details on using hashes here.

File details

Details for the file msad-0.4.1-py3-none-any.whl.

File metadata

  • Download URL: msad-0.4.1-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for msad-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 971478509f6cbb902867a6a834363d449f66b11bdce3e9a4af8593d3f1fadf5d
MD5 c58c0e28bcaca067c9aba073befd0a67
BLAKE2b-256 ce85051bc4f73565b999bf8fd135c5069e92936ed83155734b5ed03681bdb72d

See more details on using hashes here.

Supported by

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