4 Replies Latest reply: Apr 29, 2013 11:08 PM by jgraston
jgraston Level 1 Level 1

This is crazy and kind of stupid.

In trying to give myself root level permissions in the terminal I ended up going the long route through System Preferences instead of just using the sudo command in terminal


Somehow I was able to give myself 'root' level permissions through preferences....


(running OSX 10.8.3)

System Pref

Users & Groups

Login Options

Network Account Server > Join

Open Directory Utility

Edit > Enable Root User


Logged In using the exact same username/password as I did without Root permissions


Now all my app and system preferences are gone...my security keychain cred...everything. 


So i go back to System Pref and follow online instructions to 'Disable Root User'. Although this time, clicking on the padlock to lock changes doesn't do anything. The padlock stays open all the way through the instructions.


Tried several restarts...and even setting up a new alias, etc. I just want my old 'Admin' privileges back and that's it. Root scares me.


The only positive is that I was able to install the module I originally wanted using terminal...which now has a glaring 'root#' instead of the familiar myUsername$.


Anybody have any insight on how to revert back to my old ways?


Thanks in advance!

MacBook Pro (Retina, Mid 2012), OS X Mountain Lion (10.8.2)
  • remy17 Level 1 Level 1

    Essentially, you enabled the root user correctly (the steps are @ http://support.apple.com/kb/ht1528)


    The only thing you "Added" when you enabled the root user was the ability to login and use the root user account.


    What is happening is that you are logged into the root user right now, and need to log back into your admin user account. Do this by clicking on the top-left corner menu Apple > Logout..


    Once you get to the login screen, you will need to then login with your existing admin account username and password. The only thing that you changed when you enabled root was added the "other..." part of the login window/screen, your other user account is still on your computer.


    Once you've logged into your admin account, follow the steps from the article to disable root (I added it below for Lion/Mountain Lion)

    How to disable the root user

    OS X Lion

    1. From the Apple menu choose System Preferences....
    2. From the View menu choose Users & Groups.
    3. Click on the lock and authenticate with an administrator account.
    4. Click Login Options....
    5. Click the "Edit..." or "Join..." button at the bottom right
    6. Click the "Open Directory Utility..." button.
    7. Click the lock in the Directory Utility window.
    8. Enter an administrator account name and password, then click OK.
    9. Choose Disable Root User from the Edit menu.


    After choosing to disable the root user, you can just exit out of the windows that are open.


    The pad lock icon at the bottom left of system preferences/directory utility windows doesn't really matter except that it either allows or prohibits you from making changes on the options.

  • jgraston Level 1 Level 1

    Thanks Remy. I'll give it a whirl.


    I thought I tried that but maybe I missed something.

  • remy17 Level 1 Level 1

    And if logging into your user account doesn't work at the login screen, what exact error/behavior are you encountering? Do you have the user: and password: fields that you have to manually type in your information? or is your login screen setup to just click on a user account name, and just enter the password?


    It's highly unlikely your user account changed so long as you didn't make any changes/modifications to anything while in the root user.


    If you still are unsure if/what the user account name is or if it's still there, you'll have to log back into root & go to system preferences > users & groups to see if your user is listed. Use this username to login with at the login screen.






    If it isn't, open up a finder window while logged into root and click on the menu @ the top " Go > Computer ", then select "Macintosh HD" - then the folder "Users" (so you're in "Macintosh HD/Users/" folder)


    you should see a user folder that contains your data there, so again, IF your user account doesn't exist in system preferences > users & groups, you'll need to create a new user account, and most importantly the following:


    ACCOUNT TYPE: administrator

    LONG NAME: The name you want your account to say. Ex: "Remy G"

    ACCOUNT NAME: THE NAME OF THE FOLDER IN THE /USERS/ FOLDER THAT HAS YOUR DATA (Ex: "remy") -- This name MUST be all lower case, and no spaces to be a valid account name



    After entering all data, hit "create user" and it will say something like "a folder already exists with the same account name, would you like to use this existing folder for this account?" You would then click use existing folder, then try logging in with it again.

  • jgraston Level 1 Level 1

    well...I'm getting there.

    Your first set of instructions didn't quite capture the complete context of my situation. Completely understandably tho.


    What i ended up doing (for now) is:

    • Logged Out (as u suggested)
    • Logged In under the name I knew had my preferences (which is the exact same name I've been using all night and since I've owned the machine).
    • Once booted up nothing had changed.
    • Even still, I went to Sys Pref > Directory Editor
    • Unfortunately, the only option under Directory Utility was 'Enable Root User' (not 'Disable')
    • So instead of clicking that, I explored the Directory Editor window that was already open.
    • Under the 'Users' column, I selected the name that I've always used.
    • Double checked the Unique ID code. Sure enought it read '0' (root level permissions).
    • Closed that window, and then clicked/highlighted myName (see image) in the left hand column of Users & Groups under 'Other Users'.
    • I then proceeded to Change Password for that user.
    • After changing the password, I closed everything and rebooted.
    • Upon reaching Login I used the same old name but the newly changed password (btw, I just have two fields at login, no drop downs or options or anything).
    • After submitting my cred, a new dialog popup'd up telling me that if I remember my 'old' password, (the one I just changed) OSX could then grab everything in my keychain. Yay!
    • Typed in the old password and booted up to a mostly new, non-preferenced dock and desktop.
    • However, my apps seem to have all of their prefs back and Finder is not defaulting to some crazy root directory.
    • Problem is tho I still seem to be logged in as a root system admin although my app preferences are here. (see tinygrab image for the breakdown)
    • A new problem that arose as soon as I managed to successfully boot up is that the fan is spinning a helluva lot faster than it usually does.


    I attached a pic of my Activity Monitor for the kernel klinks out there. Maybe it'll provide some context as to what is going on.


    Do you think its safe to go back into Directory Utility and change my UniqueID to a code other than '0'?


    And since I'm in the 'root' right now, do you guys have any idea where OSX keeps the preferences file? I would imagine its just an XML doc. I'd love to get my hands on it and restore the dock, and such.


    Thanks for looking and all your help.