7 Replies Latest reply: Apr 7, 2012 9:58 AM by Mcadol
news33 Level 1 (0 points)

I was working to erase extra users to free up space on my iMac.  I mistakenly threw away the admin.  now the computer is locked up and I am unable to take the content off the machine for a clean reinstall.  Is there a way to access the machine threw the Root User or Super Administer to recover control of the machine and make another user the admin of the machine?  I am able to login and logout out to different users.  Please help!

iMac, Mac OS X (10.5.8), MW
  • John Galt Level 8 (45,985 points)

    Edit: Read and follow this before proceeding below the line. I do not believe it will work because you have no admin accounts, but try it anyway:


    Mac OS X: Changing or resetting an account password



    What you did is not supposed to be possible, but the impossible continues to amaze me.


    Try this:


    Boot single user mode: http://support.apple.com/kb/HT1492


    at the prompt type the following (copy and paste to avoid mistakes)


    mount -uw /


    then type




    at the prompt enter a new password for the root user (nothing will echo to the console) then type




    Log in, enter your account settings and use the user name root and the password you created for it. Change your account type back to admin.


    This should work.


    You should disable the root user after this but I need to research that. At least this ought to get you started.


    Some of the information in this KB article may be useful. It applies to earlier OS versions, but as I say you accomplished the impossible to nothing else seems to apply.


    Message was edited by: John Galt

  • Linc Davis Level 10 (192,784 points)

    Launch the Terminal application in any of the following ways:


    Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)


    In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.


    If you’re running Mac OS X 10.7 or later, open LaunchPad. Click Utilities, then Terminal in the page that opens.


    Drag or copy — do not type — the following line into the Terminal window, then press return:


    dscl . -read /groups/admin GroupMembership


    Post any lines of output that appear below what you entered — the text, please, not a screenshot.

  • news33 Level 1 (0 points)

    <dscl_cmd DS Error: -14136 (eDSRecordNotFound)

  • Linc Davis Level 10 (192,784 points)

    That means you deleted the admin group itself, and who knows what else. The following might work.


    Back up all data, then boot in single-user mode. When the text stops scrolling, follow the prompts to make the boot volume writable. Then enter the following command:


    ls /var/db/.AppleSetupDone


    You should get the following line of output below what you entered:




    If you do, then very carefully enter the following command:


    rm !$


    Now you should get the following output:


    rm /var/db/.AppleSetupDone


    Then enter




    The system will boot into the Setup Assistant, as if you were setting it up for the first time. Create a user with the same name as the old admin user. Log in and test. I'm not sure what will happen to your other user accounts, if any. You may need to recreate them.

  • Mcadol Level 1 (0 points)

    I have the same the same problem but probably easyer to resolve. Introducing the phrase you give to us <dscl . -read /groups/admin GroupMembership> the answer in my old Power G5 which I would like to get alive again terminal abswer is  root. That means the only admin in that computer after cleaning and deleting a lot of things is the system. My account is standard as I see in Prefs > accounts.


    The question is simple. How can I give admin privileges to myself? I don't remember the original admin name and I have reset the password of my standard account, giving too a password for removing firmware. Probably i forgot to select the hard disk when reseting the password.


    Would you kindly help me , please?

  • Mcadol Level 1 (0 points)

    Solved by myself after ard naviation trouh Apple Kdb documents.

    I'm very happy now.

  • Mcadol Level 1 (0 points)

    working again