Mac OS X Password Recovery
Instructions for the Mac OS X Password Recovery.
Although there’s no real way to recover a lost root password, you can change the root password even if you do not know the current one. You must have physical access to the machine in order to accomplish this task.
1. Click Restart at the login window
2. While the computer is restarting, hold down “Command-S” until you see text scrolling through the window. This boots the computer into single user mode.
3. At the Localhost% prompt type:
/sbin/fsck -y
/sbin/mount -uw /
/sbin/SystemStarter
You will then see various services starting up.
4. When the Localhost% prompt reappears, type:
passwd [username]
It will then ask you to type the new root password twice, so do so.
(Though I’ve not tried it, it appears you can type niutil -list . /users to get a list if users if you do not know the username….if someone wants to verify this, I would be most appreciative).
5. After entering the new password, type:
reboot
6. At the login window, enter the username with the new password. Once you are logged in, you can use the Multiple Users application (/Applications/Utilities) to change your user’s password, or create a new user account.
Note: this may not work for newer versions of OS X; I think they did something about it in a security update.
Hello Everyone
I’m farily new to MAC’s and i have a quick question. I received a MAC PowerBook G4 from someone to try to retreive their password. It is runnin Mac OS X 10.3.7. I was able to reset the root password using Baxter’s commands, but i cannot change the password for the other users. The only user account i can use to login to the GUI is friend.
Does anyone have any suggestions?
I know by default you cannot login as root to the GUI, ist there a way for me to enable loggin in with root from command prompt in single user mode?
Please help
Hey:
I tried using your steps and everytime i get to the point where i type passwd [username] it pauses for a second making me think i can move forward but than the fans in the computer go on turbo speed and the screen goes back to the localhost:/ prompt.
any thoughts?
Great site by the way
My ‘puter it not respond correct when try to rest it as instructed. i try and try but no peas for me? Does anyone not help me for real i try and try?
No, but seriously, does this procedure work for Tiger? There must be some changes to the daemons that need to be started. How about an update?
just to answer a few ?’s the last few folks asked i didnt see answered… btw the info you provided Baxter was very helpful, thanks.
First of all, yes Localhost:/ root# is the same as Loaclhost%
OK If you are running OS X version 10.3 this will work:
# /sbin/fsck -y
# /sbin/mount -uw /
# /usr/libexec/register_mach_bootstrap_servers /etc/mach_init.d
# cd /var/db/netinfo
# netinfod -s local
# SystemStarter
# passwd root
# reboot
You can also, after or instead of changing the root password, use passwd [username] for any other user login on that computer.
BUT if you are running 10.3.7 or later, and you are changing the root password, you must use the line:
passwd -i file -l /etc/master.passwd root
instead of just passwd root. for any other login on the computer, passwd [username] will still work normally.
hope that clears up some of the confusion.
Thanks so much for the update. Unfortunately what was mentioned above still doesn’t actually change root passwd for my system (running 10.3.9). Any further suggestions? Thanks so much.
if somebody can please help me…
first thing im running mac os x 10.3.9 and i go through the whole process of the commands and than when i reach the “passwd root” part it works and i change the root password but the only thing is that now when i reboot the computer and it reaches the login screen theres only one username there and no root, i have no idea how to login now as root because i dont have access to type in the username it has it already on the screen and also i can change the root password but i cant seem to change the username i tried everything… ex. “John Doe” i tried
passwd JohnD
passwd JDoe
passwd JohnDoe
i mean i was trying everything and it stinks because i can change the root but i cant login with it or dont know how and i cant change the username because i probably dont have the right username from the name on the login screen… please help if you can understand me, lol
I have tried all combonations and i cannot change the password. I dont have the original master password and Im stumped now can someone please help.
Ok. I bought a used powerbook g4 with no start up disc. I wanted to change passwords and somehow locked myself out. I was able to access using the root user thing. but don’t want to continue to use this to access my notebook. when i buy the new OS X tiger will I be able to change all that previuos users passwords or will it save it?I’m a new mac user and finding i little more difficult then windows. Although i must say mac seems to be very well protected.lol…I would have have been able to easily change or find passwords on a windows operating system. Any help will be greatly appreciated!
I have made all the steps, but aftre the SystemStarter command, i have a PANIC error…… so ?? Any help ??
name:jonathan
email:[email protected]
[email protected]
i just wanna say that i got it to work correctly and thank you all so much for you time and conisderation to help others and myself just by your post and comments.
thank you
brandon
Have the same problem as Liam and Milan – hangs after
SystemStarter command – opens everything (thru internet services) until
“Couldn?t open file: /System/Library/CoreServices/ARD Agent.app” message appears
Did either of you resolve this issue?, or does anyone else have a clue? Thanks
Irene
p.s. also have to use “/ -f” instead of ” -y” in first command –
running 10.3.4. Is this important?
same problem as Liam Milan hangs after systemstart command
to let passwd working you need to type
passwd -i file username
where username is the account username
if you have a nis or opendirectory
type
passwd -i nis username
or
passwd -i opendirectory username
to see all users available to change password type
cat /etc/master.passwd
Getting a
PANIC, stopping now.
while holding command-S during startup.
Any suggestions?
OS 10.2
iMac G5, OS X 1.3.6, I’m not getting any love with any of the multiple iterations. I must admit I am stymied.
you are not alone!
everything worked until i typed
passwd [username]
it did not ask for a new root password
i will try putting a period at the end
i also tried typing reboot and there was no response
This is what is displayed after i typed
/sbin/SystemStarter
Initializing Quartz display context.
kCGErrorFailure : initCGDisplayState: No display interlock
zsh: bus error /sbin/SystemStarter
so, when I put in “passwd [username]” there is no response
I will try ctrl z
any other suggestions.
I also tried what baxter recommended and I did not get any results
I dont know what is wrong but whenever i type in “passwd [username]” it doesnt do anything it wont let me retype in a new password. Any suggestions?
“/sbin/fsck -y”
“/sbin/mount -uw /”
“/usr/libexec/register_mach_bootstrap_servers /etc/mach_init.d”
“cd /var/db/netinfo”
“netinfod -s local”
“SystemStarter”
“passwd -i file -l /etc/master.passwd root
“reboot”
Worked perfect on OS 10.3.9
Hey! Thanks for this helpful hint. I recently discovered that my favorite shortcut, leaving root without a password (Yeah, yeah, I know about security risks. Suffice it to say that I feel safe enough in my situation), no longer works in 10.3.9. Neither the login nor the change password dialogs would accept the blank password. Of course, this meant that I could not change the password to something else. Your tricked worked, but I had to use passwd root, not passwd -i file -l /etc/master.passwd root. I tried the longer one first, so perhaps I have to run both of them. By the way, I tried this on a 700MHz iMac 15″ LCD.
(This should also help with lost ibook password.)
thank you very much for this extremly helpful site!
As I had to combine some different comments, I thought it might be of help to some of you, when I paste here what I have done!
apple + s –> for single user mode.
/sbin/fsck -y
/sbin/fsck -f
/sbin/mount -uw /
/usr/libexec/register_mach_bootstrap_servers /etc/mach_init.d
cd /var/db/netinfo
netinfod -s local
SystemStarter
passwd myusername
reboot
Hey, has anyone gotten the password to reset for the root account on 10.4 ? I’m actually on 10.4.2, but no luck so far. Anyone?
Hello, everything works untill I enter the cmd SystemStarter. It loads everything untill it starts to repete
“Waiting for Checking Computer Name Setup
Jan 1 XX:XX:XX SystemStarter: Waiting for Checking Computer Name Setup”
Does anyone know what the problem could be?
“if somebody can please help me…
first thing im running mac os x 10.3.9 and i go through the whole process of the commands and than when i reach the “passwd root” part it works and i change the root password but the only thing is that now when i reboot the computer and it reaches the login screen theres only one username there and no root, i have no idea how to login now as root because i dont have access to type in the username it has it already on the screen and also i can change the root password but i cant seem to change the username i tried everything… ex. “John Doe” i tried
passwd JohnD
passwd JDoe
passwd JohnDoe
i mean i was trying everything and it stinks because i can change the root but i cant login with it or dont know how and i cant change the username because i probably dont have the right username from the name on the login screen… please help if you can understand me, lol”
same problem here. could someone help?