Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How do I restore admin control after deleting the admin user?

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

Posted on Apr 1, 2012 5:16 PM

Reply
7 replies

Apr 1, 2012 5:59 PM in response to news33

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


passwd


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


reboot


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

Apr 1, 2012 7:04 PM in response to news33

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.

Apr 2, 2012 10:51 AM in response to news33

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:


/var/db/.AppleSetupDone


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


rm !$


Now you should get the following output:


rm /var/db/.AppleSetupDone


Then enter


reboot


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.

Apr 6, 2012 12:52 PM in response to Linc Davis

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?

How do I restore admin control after deleting the admin user?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.