Super User is a question and answer site for computer enthusiasts and power users. 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

Macs work well in Windows corporate environments, but a lot of companies require you to change your password after a period of time (3 months for example).

How do you change your Windows domain password without having to boot a PC?

share|improve this question
Click the checkmark next to the correct answer to accept it. :) – Sasha Chedygov Jan 11 '11 at 7:18
up vote 21 down vote accepted

From the terminal:

$ smbpasswd -U username -r DOMAIN_CONTROLLER_IP

$ smbpasswd -h
When run by root:
    smbpasswd [options] [username]
    smbpasswd [options]

  -L                   local mode (must be first option)
  -h                   print this usage message
  -s                   use stdin for password prompt
  -c smb.conf file     Use the given path to the smb.conf file
  -D LEVEL             debug level
  -r MACHINE           remote machine
  -U USER              remote username
extra options when run by root or in local mode:
  -a                   add user
  -d                   disable user
  -e                   enable user
  -i                   interdomain trust account
  -m                   machine trust account
  -n                   set no password
  -W                   use stdin ldap admin password
  -w PASSWORD          ldap admin password
  -x                   delete user
  -R ORDER             name resolve order
share|improve this answer
I posted this here because every 3 months I forget how to do this and figure someone else might benefit from this information. – Harvey Aug 10 '09 at 15:59
Unfortunately smbpasswd is no longer present in a clean install of Lion. – Nate Aug 3 '11 at 18:15
If you're running Homebrew, you may want to try running brew install – Pål Brattberg Oct 24 '11 at 9:15
For Lion, you can also install samba via mac ports. It worked for me. – Gareth Jan 19 '12 at 17:01
The samba package is part of the “default” Homebrew now, so you can just type brew install samba instead of using that URL. – bdesham Nov 24 '14 at 17:28

Another suggestion is to log in to your company's Email Web Portal. Many companies are using MS Exchange which supports changing your password through your web email session. I had this exact issue with users who were not on macs, but instead would never touch a machine that was part of the Active Directory. The webmail/password change interface made this possible and it worked for several hundred users. I must admit the failure messages were quite cryptic and utterly useless. If the password change fails because your new password lacks the complexity, it will likely fail at telling you that. So just be aware of that one limitation.

share|improve this answer
Ah, I should have mentioned that I would have done that if it worked at my company. It always says it works and does nothing. Good suggestion. – Harvey Aug 10 '09 at 16:26
The cryptic messages definately do not accurately describe whether the password change was succeful. The biggest problems I saw were related to passwords that did not meet the length, Uppercase/Lowercase, number and symbol within the password itself. You have to choose a very complex password for this to work correctly. – Axxmasterr Aug 10 '09 at 16:51
I should have added that if your password change fails because of rules, the command-line approach will give you some indication of failure while (in my experience) the web method just silently fails. However, always try the web portal method first, if available. – Harvey Jan 12 '11 at 22:52

Piggybacking off of @Havey's answer (requires non-Apple Samba, macports etc.):

I never know/remember what the IP is of the domain controller, so I've created the below script to just bring up smbpasswd to the old/new password prompt.



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

You can create a password boot disk with the following password live CDs:

  1. Ophcrack live CD
  2. Offline NT Password and Registry editor
  3. Windows Password reset for Mac
share|improve this answer

You must log in to answer this question.

protected by slhck Mar 20 '12 at 17:08

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged .