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.5.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.5-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: msad-0.4.5.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.5.tar.gz
Algorithm Hash digest
SHA256 109067b15c9bada87e49c5045b378391d76639af2f31810e93e309bedde43343
MD5 069c2d9af470637b39629582c178161d
BLAKE2b-256 17428ea6d2ee003cbb4f3c8a9a25b41ccb018813afb90fc32dfed803fe0e0d5c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: msad-0.4.5-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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 303d1bc2161dd8ea0f53b4472d45a16fefe2acc395ba277b46cd8d36616c2c5f
MD5 2708e8415a5cebd67ab58ad13d587f2a
BLAKE2b-256 88f558ea737e094bb414a5c946dc81b1b9484fcaad8424bde27f5267966c2ef2

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