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 \
samba-common-bin
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"