HOWTO: Reset a lost OS X password

I've you've forgotten your Mac's admin account password, don't worry. Assuming you haven't locked out OpenFirmware, it's a pretty simple task to change your password back to something you know.

Here's how:

  • Hold Apple+S when booting to enter single user mode
  • #sh /etc/rc
  • #passwd yourusername
  • #reboot

If you can't recall your user name, you can either look in the /Users folder (the directories are named by user), or run "niutil -list . /users".

Also, on older systems the /etc/rc script isn't available, apparently. If that second step fails, try mounting and starting the base services manually:

  • #/sbin/fsck -y
  • #/sbin/mount -uw /
  • #/sbin/SystemStarter

I've had to do this a couple of times for friends when they've bought a second hand machine, and once when I had a momentary brain lapse and forgot my own password. Works like a charm, though you'll loose any passwords stored in your keychain.

Posted by Jason Striegel | Jul 14, 2007 04:42 PM
Mac | Permalink | Comments (52) Bookmark and Share

Recent Entries

Comments

Newest comments listed first.

Posted by: mwilson on July 14, 2007 at 6:40 PM

Note that you will also lose access to your home directory if you are using FileVault. FileVault keeps your home directory in an AES encrypted disk image so if you really do forget that password kiss the contents goodbye.


Posted by: FoxMccloud on July 29, 2007 at 7:51 PM

wait,so i will lose all of my contents.?like my Itunes?? thepinkpanther888@hotmail.com


Posted by: Jefalito on August 19, 2007 at 6:56 AM

When I tried all the options it didn't work.What should I do since I dont have the cds


Posted by: zibbyplanet101 on November 28, 2007 at 8:15 PM

im a newby but i forgot my password is this going to help me reset it??


Posted by: Bradley McMillan on December 11, 2007 at 2:02 PM

help i bought a old macbook from a girl and she didnt tell me the main password now i cant get in touch with her! i tried the 2 things above and it didnt work! when i tried to start up with comand key and s its just stayed grey forever. so i opened command promt in the system as it auto loggs in and triedboth and still couldnet get it to work! I just wanna format it back to new with just the operating system and clean off all her crap can anone help?? i dont have the cd can i download it to do this from somewhere?


Posted by: Lessio Igor - In-Gen on December 12, 2007 at 3:14 AM

On Leopard to resed just enter in s mode.

type

/sbin/fsck -y
/sbin/mount -uw /

passwd (username)

it ask 2 times for password

reboot

After go into the system preferences/account and rester the password.


Regards


Posted by: Prodigy on December 14, 2007 at 12:43 AM

I have a powerbook with tiger 10.4.8. How do I reset the passwrod for my notbook?


Posted by: mandy on December 14, 2007 at 2:32 PM

This method worked perfectly. I was able to reset the admin password without a CD by following the directions above.

THANKS!!!


Posted by: sammy on December 18, 2007 at 4:06 PM

i just bought a mac book pro10.4.11 from some one i cant get in touch with now and i dont have the disks or the passwords. ive tried some of the things ive read above but nothing worked this is my first mac and im clueless on what to do but i read some thing about firm ware and i thought maybe i followed those steps right but the firm ware didnt allow me to reset can any 1 help ps i dont know what firm ware is or even if i have it. thanks


Posted by: Dizzle on December 20, 2007 at 9:21 PM

So everything looks like it going as planned but i get confused when:

localhost:/ root# passwd (username)
>

So i type in a "passwd" twice so it looks like"

>example
>example

And as explained i type in:

>reboot

and nothing happens. I hard reboot using what i think is the username (displayed in light gray under the apple) and the new password i think i set, and nothing.

Am i F'ing up somewhere?

Thanks,

Dizzle


Posted by: Chick lover on December 22, 2007 at 10:14 AM

yeah.. no work.. as soon as i type sh/ etc/rc the screen starts flashing blue... hmm


Posted by: TFH on December 27, 2007 at 11:12 AM

can anyone help me?
i just bought asus eee pc. OS linux.
i set up password and after i reboot the eee, login failed!!
my password wrong?
helppppppppp... how to reset lost password asus eee pc?
thanksss


Posted by: Jeam1223 on December 31, 2007 at 2:53 AM

Hi guys I just bought an IMAC G4 power pc(version 10.3.9) but I have no idea what the password is, I dont have the boot CD and I cannot boot it into single user mode, what can I do?????


Thanks!


Posted by: 09rm on December 31, 2007 at 8:36 PM

I have a macbook i followed these instructions and when i type in new password twice nothing shows and then it says sorry after i press enter what is going on? plz help.


Posted by: Nathan on January 14, 2008 at 1:59 AM

Hey I Dont Get It I Forgot My admin Password so how can i do this without the disc please help


Posted by: France on January 15, 2008 at 4:01 AM

Works like a charm on my ibook G4 with Mac Os x 10.3.9
Thanks Alot


Posted by: tracy g on January 16, 2008 at 4:59 AM

after you type in reboot. Do you just shut of the computer?


Posted by: tracy g on January 16, 2008 at 5:08 AM

do you imput the commands on seperate line like i did?
the password is not resetting.


Posted by: tracy g on January 16, 2008 at 8:38 AM

Thanks, got it had to mount and start base services manually.


Posted by: sean p on January 20, 2008 at 12:13 PM

i follwed the instructions everything went fine, except when i retype the pasword everytime it says sorry and of course it doesn't work after i reboot. Any suggestions?


Posted by: larry on January 24, 2008 at 3:55 AM

idk wats wrong it stll tells me password is incorrect


Posted by: aaron on January 24, 2008 at 8:59 PM

how do i reset my master password??????
please help!!


Posted by: mardy on January 28, 2008 at 7:24 AM

hi i recently bought a power book off someone and they no longer live in this country and i cant get in touch with them, can you help.

i cant reset the password and ibeen trying desperatly what you said on the screen, i dont have disk either and can only get to the point where it says sbin/mount, after that process i type in passwd and user name but nothin happens


Posted by: dub on February 3, 2008 at 11:06 AM

If you can't remember a user name, where exactly are you supposed to run "niutil -list . /users" ? Also, when running single user, the first line "#sh /etc/rc" comes up automatically on my system (OS 10.4.10). If you type that out, it reboots and takes you to the blue screen.


Posted by: mazzi on February 5, 2008 at 7:54 PM

I tried all the example's listed above and still couldn't reset my admin. password on the mac book pro.someone please help me -www.mazzicoworld@yahoo.com


Posted by: Jay on February 18, 2008 at 4:36 PM

Got a Mac Book Pro from a bud.. No disc, tried method of resetting password, but not It is starting up as if it needs to go through setting up mac for the first time out of the box. I try to connect wifi and register it, but it doesn't work.. Can someone help please.

jay


Posted by: eddie on February 21, 2008 at 1:50 AM

ok so i have a mac os x ibook g4 laptop with no discs and i dont no the password can anyone please explain to me how to reboot it please anything will help if u would like to help me and be a good person email me at edthekid214@aim.com thank you


Posted by: Dale on February 22, 2008 at 2:20 AM

i got a macbook myself & when i try to reset the password & type in sh /etc/rc at single user mode it goes through its paces then it doesnt ask for the password it goes all the way to a blue screen with no login on it just the pointer icon please if someone can walk me throught this on yahoo or msn id be glad to hand out my screename for some help


Posted by: dbeau on March 3, 2008 at 3:26 PM

every time i try to e-mail someone the ibook won;t let me asking for password and i don't have it or the cd


Posted by: pete on March 13, 2008 at 6:42 AM

Hey I bought a mac g4 off craigslist and i cannot get in touch with the original owner i need to reset the master password can anyone help.


Posted by: jim on March 14, 2008 at 8:32 PM

If you get the Sorry command you are not typing in the correct user name. Look again at the username and make sure you have typed it in fully.


Posted by: jennifer on March 21, 2008 at 3:03 PM

Wow thank you I'd completely forgotten my password and this worked perfectly, once I figured out not to type the # marks (my first time using command prompt obviously). Thanks!!


Posted by: lhansberger on April 10, 2008 at 12:42 PM

nice!

works like a charm (osx 10.2.8) thanks!


Posted by: T on May 14, 2008 at 6:25 AM

Ms

Hi everyone!

I have for the past two days tried to reset the admin password. I have a PowerBook G4 (OS X 10.4.9) i've had it for just over a year and there was never any issues as i was asked what i wanted on it and it was there. I recently got a new ipod & needed to upgrade my itunes - yet for some reason i can't because i need admin rights! I didn't have the install disc which i read i needed so i went back to the place i got it from only to find they are no longer there. Sooooooo i asked around and got install discs from friends which happen to be other versions and none work. I stumbled upon this page tonight and for the last 2 hours have been following the advice to no avail. If someone would be REAL nice & contact me in regards to this i would really appreciate it.

Thanks in advance


Posted by: chris on May 27, 2008 at 11:48 PM

wow this was amazing works fine i had to do it like a million times but i figured it out


Posted by: Daniel on June 6, 2008 at 7:17 PM

HELP!!

I have tried doing this password reset every way that I can find but I just can't seem to do it. I'm new with Macs. All I know is that I have an iMac G3 with OS X 10.2, I have no disks, and I needs to reset the main root password. Please email me specific instructions, perhaps with screen shots. Thanks! daniel_1992@msn.com


Posted by: sean on June 7, 2008 at 9:49 PM

plz help

now whoever is good at this when i'm typing in the word username or my username and do i type in the word password or the new password i want thanx in advance if u really wanna help email me at dragonchampion06@aol.com


Posted by: amanda byrne on June 18, 2008 at 4:26 AM

miss

please someone help, i just bought a mac book though the loot, it was fine when i was looking at it with the person who sold it to me, but when i got home i had lost the paaper with the password onit, his number is not anwsering and i have no way of contacting him.... plus to make matters worse i have no disk with it.....


Posted by: HELP ME PLEASE!! on June 21, 2008 at 4:19 PM

MAC OS X 10.4.8 Admin passwrd

got it from a friend no disk no password..everything works great on it..but i cant install anything. already have vital info on it..need to reset password without disc and without losing info. the master password is not set and filevault is not on..just need the admin pass. or reset it .


Posted by: Paco on July 7, 2008 at 11:23 AM

HOWTO: Reset a Lost OS X Password

The listed procedure works great, provided you are not locked out via Firmware Protection. Is there a workaround if you are locked out by Firmware? Because I made the mistake of changing my Admin Password prior to going on holiday, only to forget what I had changed it to. Your help in restoring order would be most appreciative. Thank you


Posted by: Paco on July 7, 2008 at 11:37 AM

Hello Amigos!!

The procedure works great, just like it is written. Key word being, "provided" that you are not locked out via Firmware Protection. My question is there a procedure / workaround in which I may be able to reset my admin password. If so, that would be great. Your help would be most appreciated to help retsore order. Thank you and have a nice day!!


Posted by: on August 4, 2008 at 8:54 PM

ibook m6497, mac os x, during boot up asks for username and password, don't know either, don't have any disks, can i get pass this?


Posted by: on August 4, 2008 at 8:57 PM

ibook m6497, mac os x, during boot up asks for username and password, don't know either, don't have any disks, can i get past this?


Posted by: on August 4, 2008 at 9:00 PM

ibook m6497, mac os x, during boot up asks for username and password, don't know either, don't have any discs, can i get past this? please help


Posted by: Tiphoni on August 4, 2008 at 9:12 PM

Reset Password without Installer Disk

So I have tried for hours to follow the instructions above with no such luck of others! I start up and press Apple S, and the last command I get states:
If you wish to boot the system:
exit
:/root#
Someone please tell me what I am supposed to do from here? I have tried the entries from above (all), and nothing seems to help! If you can assist, please email me @:tiphoni97@yahoo.com


Posted by: Tiphoni on August 5, 2008 at 8:34 AM

I got it!

After hours of trying, I finally got it! I am using the computer that I didnt have a password for. Although it didnt exactly happen the way stated above, the entries are correct! Thank you very much!


Posted by: justin Richardson on August 15, 2008 at 10:58 AM

please help

i have the same issue as reset password without installer disk. I have tried all the commands above and have no luck. I see the same command:/root#
I do not know the admin password and i don't want to load programs on it until i change this. I got this mac g5 second hand.

Can someone help, i would like to reset the whole mac if i can. Thank you so much, if you can help please email- electricpaperjam@gmail.com


Posted by: jooles on August 18, 2008 at 1:32 AM

Works like a charm

Hubby bought a used iBook G4 for cheap with a video problem...fixed that, then had to figure out the password for the admin. Looked up some set of directions on his own, but they were not working. I looked up these set of instructions, the ones from 12-12-07, he did what you said to do, and long story short it worked.

If you have never messed around with linux, and need help, seek out someone who's more technically adept than you to help you get this figured out. It's not that hard after seeing it done, just be patient and all will be well. :)


Posted by: dbh on August 22, 2008 at 8:33 PM

alright...everything works as described except for the part when i go to change the password. i am prompted to enter a new password which i type in (however 'cursor' doesn't move, ie it doesn't look like i'm typing) and then to confirm the new password.

this is where i am having difficulty. i type the same thing as i did for the 'new password' but it does not accept it.

any ideas?


Posted by: kate on September 9, 2008 at 5:12 AM

im not sure what im doing wrong

i started up the pc && entered apple and s. i got to the menu i think im supposed to see. i entered those things, but i dont think i did something right. i entered the 1st line. hit enter. ummm, what EXACTLY am i supposed to enter for the 2nd line? passwd && the name of my account? then the other stuff? i seen some people said somehting about having to enter a passwrod twice, i didnt do that. i hit reboot && the comp reboots. but every single time, nothing has changed. im a bit of a blonde, sorry. can anyone help me through this step by step? i really need my com working again.

thanks so much


Posted by: Melanie Lauren on September 16, 2008 at 2:38 PM

same story.. got a Mac 0Sx 10.2 (i think) with no disks. Tried the steps above but screwed it up. Now when I hit command s on my keyboard I can't get anywhere but to the regular operating system login screen..
I've tried this over and over again and it won't let me back into the backend.
It didn't recognize the /etc/rc the first go-round so I did the manual, which was fine, but then I forgot to do the password portion of the command and restarted before I should have.. now all the problems.
Please email me at melaniedayle@hotmail.com

Thanks!


Posted by: JF on October 3, 2008 at 2:07 PM

worked for me

Used on iBook G3 800MHz, 10.2.1.

Rebooted with Apple-S, then entered 2nd part of instructions (without hash, of course), then went from 2nd line of 1st bit - I.e. passwd etc. Good luck!


Leave a comment



Bloggers

Welcome to the Hacks Blog!

Brian Jepson.Brian Jepson


Jason Striegel.Jason Striegel


Philip Torrone.Phillip Torrone



See all of the books in the Hacks Series!
Advertise here.

Recent Posts

www.flickr.com
photos in Hacks More photos in Hacks