[HOWTO] Reset User Password via single user mode

Discussion in 'HOWTO & FAQs' started by Satcomer, Apr 23, 2008.

  1. Satcomer

    Satcomer In Geostationary Orbit

    Joined:
    Jul 16, 2002
    Messages:
    9,165
    Likes Received:
    10
    Trophy Points:
    38
    Occupation:
    Looking toward the sky
    Location:
    Finger Lakes Region
    Read this MacOSXHint on how to reset your 10.5 password via the single user mode.

     
    Giaguara, ora, empress and 1 other person like this.
  2. g/re/p

    g/re/p I can haz cigar?

    Joined:
    Mar 8, 2003
    Messages:
    1,712
    Likes Received:
    4
    Trophy Points:
    38
    Occupation:
    I am the eggman, they are the eggmen, I am the wal
    Location:
    sitting on a cornflake, waiting for the van to com
    Cool hack! And one more reason to block single user mode by setting a firmware password if you use a mac at work!
     
    chevy likes this.
  3. dbash

    dbash Registered

    Joined:
    Aug 23, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Thank you very much, but when I boot I hear the chime and then nothing but a black screen.
     
  4. whisky1980

    whisky1980 Registered

    Joined:
    Aug 25, 2008
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    says command not found when i type passwd somebody please help..!
     
  5. nixgeek

    nixgeek Mac of the SubGenius! :-)

    Joined:
    Jan 2, 2004
    Messages:
    8,621
    Likes Received:
    5
    Trophy Points:
    0
    Occupation:
    Microsystems Tech for two elementary schools.
    Location:
    Miami, FL
  6. Flondrixa

    Flondrixa Registered

    Joined:
    Feb 8, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    instead of typing
    dscl . -passwd /Users/username password
    just type
    passwd /Users/username password
    thats what worked for me.
     
  7. sheraz4u

    sheraz4u Registered

    Joined:
    Feb 24, 2009
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    single user mode reset password:leopard
    mount -uw /
    ls /users
    passwd (user's name)
    (enter the password cannot be seen)
    reboot


    ------

    single user mode change password tiger

    1. mount -uw /
    2. sh /etc/rc
    3. ls /users
    4. passwd (user name)
     
  8. bertnspike

    bertnspike Registered

    Joined:
    Feb 2, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    East Central Florida
    I'm sorry, but I don't understand you at all. I bought a used mac laptop. The person I bought it from doesn't remember the password, so I can't install any new software or make myself the administrator. What can I do?
     
  9. Satcomer

    Satcomer In Geostationary Orbit

    Joined:
    Jul 16, 2002
    Messages:
    9,165
    Likes Received:
    10
    Trophy Points:
    38
    Occupation:
    Looking toward the sky
    Location:
    Finger Lakes Region
    Ask yourself if it is a PPC or Intel Mac? Plus whenever asking for help please list the Mac and possible the version of OS x you are using.

    Now do you know how to boot into Single-User mode? For the instructions to boot into that mode and once that comes up type the instructions provided by sheraz4u. He expanded my original post for 10.4.x for Tiger users (Tiger is 10.4.x and Leopard is 10.5.x).

    Lastly if you just bought that from a user then he/she should have reformatted or provided you with a password. Plus you should NEVER buy a used computer without the original install disk provided with it. If you think about it the seller might leave all their personal stuff on the Mac/computer (that is advice for any kind of computer).
     
  10. bertnspike

    bertnspike Registered

    Joined:
    Feb 2, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    East Central Florida
    Okay. It's a PPC mac. System OSX4.11. He DID reformat and wipe and all that good stuff. Made the admin noname and can't remember what he made the password.

    I have never started any Mac and seen a place where I could enter anything like the following:
    1. mount -uw /
    2. sh /etc/rc
    3. ls /users
    4. passwd (user name)

    Is this something that only happens in single-user or verbose mode? I understand getting there, I've just never done it.

    I appreciate your help. Thank you.
     
  11. Satcomer

    Satcomer In Geostationary Orbit

    Joined:
    Jul 16, 2002
    Messages:
    9,165
    Likes Received:
    10
    Trophy Points:
    38
    Occupation:
    Looking toward the sky
    Location:
    Finger Lakes Region
    Well follow these steps (since you have a Tiger (10.4.11) these are the steps). I will try to be right to the point.

    1. Ask the person who sold you the Mac what Username did he give the Mac when he formatted it before he sold it. This is VERY import!

    2. Find the Power button.. With the other hand hold the two buttons Command (apple key) button + the letter S (at the same time) while booting up the Mac.

    3. Hold down the command + s until you see a black screen with white scrolling letters. Let go of the buttons at this point.

    4. At the prompt sign (where you can type) type:
    fsck -y

    Let that run (it will run for about 5 to 10 minutes) until it reports all is well with the disk. At the point of this it will give you another typing prompt.

    4. Type: mount -uw /

    Then hit the 'return' button.

    5. At the next prompt type: sh /etc/rc

    Then hit the 'return' button.

    6. At the net prompt type: ls /users

    Then hit the 'return' button.

    7. At the next prompt (at this point you NEED to have the Username the person made on that Mac) type: passwd (your Username without the quotes )

    At this point it should ask you to type the new password for the Username you used. It will ask to type the new password one more time to make sure it is good before it changes the password. If all goes well and the change is successful you can type: reboot at any prompt to exit single-user mode and reboot the Mac into normal mode.

    Lastly at the login page you will be able to use you new password to login. If you can login go you system Preferences (in the Dock) and launch it. Choose the "Accounts" pane to change the user preferences about logging in. What ever you DON'T change the current logged in User name at any time. Just make a new Administrator account and then login to that new Account and then you can go to the same place and then delete the Username that is not yours.

    I hope this helps because it the best I come up with at this time of night before bed. Good Luck.
     
    Last edited: Apr 8, 2009
    bertnspike likes this.
  12. bertnspike

    bertnspike Registered

    Joined:
    Feb 2, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    East Central Florida
    Non-geek-speak-computing for dummies. Amen. Can't thank you enough.
     
  13. Graphorrhea

    Graphorrhea Registered

    Joined:
    Jul 29, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Pacific Northwest
    ----
    single user mode reset password:leopard
    mount -uw /
    ls /users
    passwd (user's name)
    (enter the password cannot be seen)
    reboot
    ----

    Would I use this if my Admin account changes to standard? This what happened and now I can't add software, change file names, etc. It happened after I downloaded OS X 10.5.7 . Now everything is messed up for Admin account.

    iMac Early 2009, OS X 10.5.7
     
  14. Satcomer

    Satcomer In Geostationary Orbit

    Joined:
    Jul 16, 2002
    Messages:
    9,165
    Likes Received:
    10
    Trophy Points:
    38
    Occupation:
    Looking toward the sky
    Location:
    Finger Lakes Region
    You have different problems! The hint was only to change an password. Unless you really messed up the instructions then something else went wrong. Do you still have the OS X install disk? If you do then do an Archive & Install to keep your programs and fix your system problems.

    Plus did you read the hint [HOWTO] Fix User lost Administrator privileges?
     
  15. Graphorrhea

    Graphorrhea Registered

    Joined:
    Jul 29, 2005
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Pacific Northwest
    I read the blog and wondered if that is the route I would go to fix my problem.

    Do I need to use the startup disk to remedy my problem? I found instructions for that too.

    I'm still confused which way to proceed.

    These are the instructions:
    Mac OS X 10.5: Administrator user changes to standard

    Symptoms
    After performing an upgrade installation (the default type) of Mac OS X 10.5 Leopard, an administrator account may change to a standard one.
    Resolution
    1. Start from your Mac OS X 10.5 Install DVD. (You do not need to install Leopard again.)
    2. From the Utilities menu, choose Reset Password (do not choose Firmware Password Utility).
    3. Follow the onscreen instructions to reset the root password (the root account is not the same as your account). Specifically: Select the name of the drive that Mac OS X is installed on, select the user named "System Administrator (root)" from the pop-up menu, type the password in the first field, re-enter the password in the second field, then click the Save button.
    4. Restart from your Mac OS X Leopard volume.
    5. When the login window appears, select "Other..." and log in as the root user using the password that was created above.* Note: If Mac OS X automatically logs in, choose Log Out (name) from the Apple menu to get to the login window.
    6. Go to Accounts preferences and check (enable) "Allow user to administer this computer" for the affected user.
    7. From the Apple menu, choose Log Out root....
    8. Log in as the user account that had this issue. (Your account should now have administrator access.)
    9. Use Directory Utility to disable the root user via Directory Utility's Edit menu. You may need to click the lock icon first).



    Is resetting the password for the 'root' account the same as in your instructions? In other words I determine the 'root' account's password right then?
     
  16. stilbite

    stilbite Registered

    Joined:
    Oct 13, 2005
    Messages:
    69
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Digital Printer
    Location:
    Leeds, UK
  17. Brenton

    Brenton Registered

    Joined:
    Sep 4, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    When I enter the command sh /etc/rc, I get stuck on this repeating message:

    Sep 3 23:16:00 brenton-walters-ibook-g4 lookupd[58]: Can't load /System/Library/PrivateFrameworks/NetInfo.framework/Resources/lookupd/Agents/NI.bundle/NI

    The last NI alternates with DS, and the time changes as it repeats. I can still enter commands to break up the repetition, but I when I enter the last one (passwd my username with a space) I get this:

    usage: passwd [-i infosystem] [-l location] [name]
    supported infosystems are:
    netinfo
    file
    nis
    opendirectory
    for netinfo, location may be a domain name or server/tag
    for fil, location may be a file name (/etc/master.passwd is the default)
    for nis, location may be a NIS domainname
    for opendirectory, location may be a directory node name

    then back to the repeating line.

    Edit: I just entered passwd myusername (without the space) and it returned:
    Changing password for myusername.
    New password:

    I typed in a new password, then retyped it, and it said Sorry. I tried this multiple times, being extra-special careful. Should I just take it in?
     
  18. Brenton

    Brenton Registered

    Joined:
    Sep 4, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    I just tried to create a new admin in single user mode following these instructions:
    http://discussions.apple.com/thread.jspa?messageID=9581510&#9581510

    and my ibook is now stuck on a blue screen. It booted up, asked me what language I preferred as if I was a new user, then started to load (spinning rainbow) and now just a blue screen. Feel free to email me to tell me I'm a moron for messing with my computer in single user.
    brentonwalters@gmail.com
     
  19. co19

    co19 Registered

    Joined:
    Sep 2, 2009
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Webmaster
    ahaha, we all need to screw up the first time, and it has to be frustrating. Or else everyone would be a computer genius.
    In more helpful words, have you tried inserting the OS install disk and repairing permissions?
     
  20. gamemaniac

    gamemaniac Registered

    Joined:
    Sep 2, 2009
    Messages:
    16
    Likes Received:
    0
    Trophy Points:
    0
    Too many different answers and not sure which one could be the best and sure shot way to go.
     

Share This Page