Forgot your SU password? Don't panic

Ever typed in an SU password when you first setup the machine, only to totally forget what it is six months later.

Yeah, me too.

In fact, that just happened.

So what I ended up doing was using the following neat bit of code.

If you can log in to OS X with an “Admin” type account then you’ll be lucky enough to sort the problem out with the following.

First, open a Terminal window. Terminal is an terminal command line program that lives in Application -> Utilities

Once you got that going, then type in the following command.

sudo passwd root

You be asked to type in a new password and then confirm it.

AND THAT”S IT!!

You’ve set a new root / su password. Now wasn’t that easy enough?

By the way. It’s always best to create an “Admin” account that’s not your active account. Then create a “User” account for all your normal work. When you need to install heavy duty software, then you can simply use the Admin account or simply type those credentials into OS X. The benefit of which is that by default, you machine is running a more secure environment. Plus, if you DO trash your user profile. You can just log in as the Admin, delete it and start again.