A minimal Docker image for changing Active Directory passwords using impacket's changepasswd.py.
- No Windows machine or AD-joined host required
- Works from macOS or Linux
- Stripped down to
changepasswd.pyonly — no other impacket tools included - Runs as non-root
docker run -it --rm bcit/changepasswd username@domainExample:
docker run -it --rm bcit/changepasswd jsmith@ad.example.comYou will be prompted for the current and new password interactively.
docker run -it --rm bcit/changepasswd domain/username@dc-ipExample:
docker run -it --rm bcit/changepasswd ad.example.com/jsmith@10.0.0.1Add to your .bashrc or .zshrc for convenience:
ad_passwd() {
if [[ -z "$1" ]]; then
echo "Usage: ad_passwd USERNAME@DOMAIN"
return 1
fi
docker run -it --rm bcit/changepasswd "${1}"
}Then just run:
ad_passwd jsmith@ad.example.comThis image uses a Rakefile to generate the Dockerfile from Dockerfile.erb and metadata.yaml before building.
rake| Base image | python:3.12-alpine |
| Impacket version | 0.13.0 |
| Runs as | non-root (appuser, uid 1000) |
| Included tools | changepasswd.py only |