Change passwords on other accounts using Terminal

In work I have multiple accounts with security requirements making me change the passwords every 90 days. Normally with Windows I used to use CTRL+ALT+DEL and select the change password option. However on Mac OS X it’s not as straight forward… or is it? Using Terminal you can switch into any account by typing:

su yourAccountName

You will be prompted to enter the password for yourAccountName.

Then you can change the password for this account by typing:


You will have to enter the old password, then your new password and then repeat your new password.



How to switch between users on one terminal?
Change password on root user and user account

OS X Default Apps Not Changing

I ran into another weird issue during my first week with my MacBook Pro, for some reason I couldn’t change any of the default apps. Since this is my work laptop I wanted Outlook to be my default email client not Apple’s Mail.

However, it turned out I needed to reset my default app preferences as the preferences file had become corrupt! Use the following command in terminal to do it:

/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -all local,system,user

Worked great for me 🙂

Source: Unable to change default email application