Change Windows AD password from Linux
Solution 1:
I've done this on OS X, the same command exist on linux.
According to this site. Looks like the way to avoid adding the username to smbpasswd file to use smbpasswd -U <user> -r <IP address of DC>
Solution 2:
I'm using the same solution as @JamesBarnett
, I've just created a script that also gets the domain controller IP too (I never know what the IP is when I need to change my password).
#!/bin/bash
USER="your.username"
DOMAIN="yourdomain.com"
smbpasswd -U $USER -r `nslookup _ldap._tcp.dc._msdcs.$DOMAIN | awk '{print $2;exit;}'`