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.5.0.tar.gz (19.7 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.5.0-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for msad-0.5.0.tar.gz
Algorithm Hash digest
SHA256 37e85b122c4616f32675f21a7820253c28b50e7ddcf0e9c42f1f030f80b28b7f
MD5 6249af1c896fdb43d09c4f117f236a0f
BLAKE2b-256 aac3826338680c1383ba282732aecb210ca4bbe5f3c827523865c593855ae5f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: msad-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 23.1 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.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 70daabf3ae6028ee9774c5faee4c0be426950e957dccf5c9d2434153ac097ed2
MD5 31c09ac7e4c30d1bd7278b956844031d
BLAKE2b-256 d36abad2ed56edb51c9a743fe2e9713362bf67333761dcbe107a8f28d0e8aace

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