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.2.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: msad-0.4.2.tar.gz
  • Upload date:
  • Size: 20.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for msad-0.4.2.tar.gz
Algorithm Hash digest
SHA256 5cdc83316ca112857774cf5b95e3a84e433312d02c0021ad91a14f56fc2cdc1b
MD5 2f67efb746ff720356e28a3e33921c84
BLAKE2b-256 30f28c7161d40d4b79ce26c4f4e387d079f87fafb7b2de687805a9d780b44d55

See more details on using hashes here.

File details

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

File metadata

  • Download URL: msad-0.4.2-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.5

File hashes

Hashes for msad-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d9c31f3015eb297caabe352c9607c046504b41af01148eacbf011e1c3664a1a0
MD5 ba8f323b4c87176d779a9f2137ec4467
BLAKE2b-256 6c8af05f8d60c919d6ba0b9662c2f3e671d8c237138bb19580183144b0c255bc

See more details on using hashes here.

Supported by

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