I need to change my Active Directory password at my office, we have documentation on linux to use smbpasswd command line. On Debian, this command can be found in samba-common-bin. I wish I could switch my password from MacOS but I can't find smbpasswd command.

2 Answers 2


Active Directory uses Kerberos for all authentication and supports the password-change protocol, so you should be able to directly use kpasswd user@REALM instead.

  • This is the best answer.
    – SDG
    Feb 3, 2021 at 3:31

As a workaround, I found I could just run on linux, inside docker! I found dperson/samba which contains the compiled smbpasswd command. No need to try to setup samba on MacOS anymore ;)

docker run --rm -it dperson/samba \
bash -c "smbpasswd -U my_activedirectory_username -r 10.x.y.z"

Or if you like doing things on your own like I did, here's a debian Dockerfile which installs samba-common-bin:

FROM debian:latest

RUN apt-get update && apt-get install -y \

Then you can build and run that docker file

docker build . -t example/debian-samba-common-bin
docker run --rm -it example/debian-samba-common-bin \
bash -c "smbpasswd -U my_activedirectory_username -r 10.x.y.z"

I published the above to github.com/GabLeRoux/docker-debian-samba-common-bin, so you can do this:

docker run --rm -it gableroux/debian-samba-common-bin \
  bash -c "smbpasswd -U my_activedirectory_username -r 10.x.y.z"


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.