Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there a way to change my Windows domain password from Linux?

share|improve this question

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>

share|improve this answer
According to the smbpasswd man page, this won't do the right thing; the -a flag means "the username following should be added to the local smbpasswd file". It's possible that the man page is incorrect; but I'm suspicious. – larsks Jan 25 '11 at 1:47
Thanks I checked the manpage and then checked google and changed the answer. – JamesBarnett Jan 25 '11 at 2:19

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).



smbpasswd -U $USER -r `nslookup _ldap._tcp.dc._msdcs.$DOMAIN | awk '{print $2;exit;}'`
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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