Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

slooksterPSV

macrumors 68040
Original poster
Apr 17, 2004
3,546
309
Nowheresville
Ok Let's say you're logged in but you forgot your password (you can probably do this on verbose/single user mode as well). Here's how I change that password - AS LONG AS ROOT HASN'T BEEN ENABLED YET:

Go to a terminal (or maybe in verbose mode you are in a terminal already (bash) so you can just type these in). Terminal is located in /Applications/Utilities/Terminal.app
Now type in these commands [key] denotes to press the key:
su[enter]
Password:[enter]
root#: passwd you're username (short name)
Changing you're username (short name)'s password.
New Password: Enter_the_password_you_want[enter]
Retype Password: Enter_the_password_you_want[enter]

Congrats you just changed it:
Why this works? You haven't enabled root so root has no password, that's why su works without a password. Now you can type in passwd then the username to change its password, w/out having to know it. Root has the ability to change your password no matter what.

This is horrible security, what you want to do is enable root and make the password something instead of leaving it blank. I wonder if Apple knows about this? -- Bad hacker tip!
 
If you've forgotten your admin password and are afraid of the Terminal, just boot your Mac from the OS X install disc. Under one of the menus, there is an option to reset passwords of any user on the computer. This can be disabled, but it is enabled on Macs by default.

If you're only finding out about this for the first time, I bet there's a good chance that you haven't dicked around with the settings yet :p
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.