Resetting Your Admin Password...without CDs

Discussion in 'OS X' started by OutThere, Nov 4, 2005.

  1. macrumors 603

    OutThere

    Joined:
    Dec 19, 2002
    Location:
    NYC
    #1
    So I forgot my password today, and I didn't have my install CDs, and, really needing my computer, I decided to figure out how to fix it all on my own. :cool:

    Basically you create another admin account, which really is far too easy to do, but here we go:

    (Remove all quotes before typing the commands I put here)

    1) Start up in Single-User mode by holding Apple+S at startup...the screen will go black and be covered in white text.

    2) Type "/sbin/fsck -y", hit return, then type "/sbin/mount -wu /"

    3) Once you have the prompt again type "cd /var/db/"

    4) The prompt will change slightly. Then type "ls" and verify that somewhere in the table of items there is the file: ".AppleSetupDone"

    5) Making sure that this file is there, then you can delete it by typing "rm ./.AppleSetupDone" or move it to the root of your hard drive for safekeeping by typing "mv ./.AppleSetupDone /"

    6) Once it is no longer in place, type "reboot" and the computer will restart...and the first-run video will play and prompt you to register. You don't have to fill any of this in, you can just press Apple+Q, confirm the dialog, and you'll be presented with a page where you set up a new admin account. Put in whatever you want, log in, and you can change the password on your main account. :)

    If you're ever in a fix, being able to do this can be very helpful.
     
  2. macrumors 6502

    ElectricSheep

    Joined:
    Feb 18, 2004
    Location:
    Wilmington, DE
    #2
    You can safely just delete the .AppleSetupDone file since it is little more than the plist of the registration information you fill out when you finish creating your account for the first time.
     
  3. thread starter macrumors 603

    OutThere

    Joined:
    Dec 19, 2002
    Location:
    NYC
    #3
    The only reason that I felt people might want to save it was if they didn't want to have to put their info back in. If they just moved the file back to where it was before after making a new account then they would have their registration info stored right on their computer without having to put it all back in. :)
     
  4. macrumors 68040

    Koodauw

    Joined:
    Nov 17, 2003
    Location:
    Madison
    #4
    Wow, this is pretty darn cool. Perhaps you should send this to Apple. I dont think its a real big security flaw, because most people wouldnt be able to do this, but its kinda nice to know.
     
  5. macrumors 6502a

    Benjamin

    Joined:
    Oct 27, 2003
    Location:
    Portland, OR
    #5
    Nice find, I don't think it is that serious of a flaw, might want to send it to apple, but seeing you have to be physically at the computer to do this... anywho.. just for clarification it isn't super user start up but single user mode when you apple + s.
     
  6. macrumors newbie

    Joined:
    Apr 25, 2008
    #6
    Thank you very much for this. It WORKED.
     
  7. macrumors 68040

    Koodauw

    Joined:
    Nov 17, 2003
    Location:
    Madison
    #7
    Seeing as this thread is almost 2.5 years old and when it was posted I think Tiger was the OS du jour, can anyone confirm this still works with Leopard?
     
  8. macrumors 68020

    Xavier

    Joined:
    Mar 23, 2006
    Location:
    Columbus
    #8
    Ya, i did this awhile back in Tiger when I was in a similar situation.

    Since then I have remembered my passwords
     
  9. macrumors 6502a

    chagla

    Joined:
    Mar 21, 2008
    #9
    wow!
    resetting windows admin password takes some more efforts!
    but then i thought Windows was less secure.;)
     
  10. macrumors member

    Joined:
    Feb 21, 2008
    #10
    Apple likes to boast security, while at the same time, making it so users don't brick their installs when the less technically inclined forget their password. It's really impossible to have both without some compromises. Personally, I find most of apples claims of security (besides the actual internal structure of the OS) a joke in how things are presented to the user by default (no encryption options for time machine, general openness to ease of use over security), but that's besides the point here.

    If the fact that people can do this worries you, look into enabling the open firmware password which can't be changed without some hardware intervention, and is independent from the operating system. I personally would never run a laptop without the open firmware password enabled. Details on how to set it up are here http://support.apple.com/kb/HT1352

    Unfortunately it's still a joke in the end, all you need to do is change the size of ram in the machine (by taking a stick out) and hold down the appropriate buttons to reset the pram while the machine is booting up.

    edit -- I'm pretty sure this hasn't changed with leopard. It's actually more under a 'feature' than a flaw :/
     
  11. macrumors 604

    GFLPraxis

    Joined:
    Mar 17, 2004
    #11
    To the people worried about security:
    It's a generally accepted fact that, barring an encrypted drive, if someone has physical access to your machine, they can hack it. Doesn't matter what OS.

    So I only care about security from outside intrusions. If someone has physical access to my machine and know what they're doing, they can hack it.
     
  12. macrumors 6502a

    chagla

    Joined:
    Mar 21, 2008
    #12
    lol.
    it works on leopard too. i just did it. :rolleyes:

    guess i'm gonna go back to Suse Linux.
     
  13. macrumors 68040

    tdhurst

    Joined:
    Dec 27, 2003
    Location:
    Portland, OR
    #13
    Yep

    Exactly. Very few computers need to protect against someone with physical access, as the data on them, while important no doubt to the owner, isn't all that of a big deal.

    Cool password trick, though.
     
  14. macrumors newbie

    Joined:
    Sep 25, 2009
    #14
    Emac will not reboot after Walkthrough

    I acquired some ~2005 era emacs to set up for the teacher across the hall from me at my hs . When trying to create the new user account to gain admin access, the computer will no longer reboot. Ive followed the online walkthrough and the first emac I attempted this on worked. The next two will restart and ask to set the main language. then will remain on a blue (changing with occasional cursor) screen indefinitely. I don't know what info you will need to help, but ill give you the mac's reactions to the commands:

    1) Start up in Single-User mode by holding Apple+S at startup...the screen will go black and be covered in white text.
    check

    2) Type "/sbin/fsck -y", hit return,
    ** /dev/rdisk0s3
    ** Root file system
    ** Checking HFS Plus Volume
    fsck_hfs: Volume is journaled. No checking performed.
    fsck_hfs: Use the -f option to force checking.

    when Force checked, it runs through a list and the final msg states
    **The volume Macintosh HD appears to be OK.


    then type "/sbin/mount -wu /"

    HFS: Removed 1 orphaned unlinked files

    3) Once you have the prompt again type "cd /var/db/"
    4) The prompt will change slightly. Then type "ls" and verify that somewhere in the table of items there is the file: ".AppleSetupDone"
    5) Making sure that this file is there, then you can delete it by typing "rm ./.AppleSetupDone" or move it to the root of your hard drive for safekeeping by typing "mv ./.AppleSetupDone /"


    As i reenter the list there is no applesetupdone file
    the list reads:
    .2z694-5176 ColorEquivalenceCandidates crashdump openldap
    .AppleCustomMac CodeEquivalenceDatabase crls samba
    .AutoBindDone RemoteManagement dhcpclient shadow
    .RunLanguageChooserToo Spotlight-V100 dlyd statd.status
    .com.apple.iokit.graphics SystemEntropyCache loginwindow.boottime volinfo.database BootCache.playlist SystemKey netinfo


    6) Once it is no longer in place, type "reboot" and the computer will restart...and the first-run video will play and prompt you to register. You don't have to fill any of this in, you can just press Apple+Q, confirm the dialog, and you'll be presented with a page where you set up a new admin account. Put in whatever you want, log in, and you can change the password on your main account.


    Never gets past the select main language dialogue....

    I have attempted some other fixed i found online and nothing has remedied the problem. Thank you very much for your help.

    -Ryan
     

Share This Page