1 2 Previous Next 16 Replies Latest reply: Nov 20, 2012 7:44 AM by disguise
thedatadude Level 1 Level 1 (0 points)

I am trying to use the Apple-approved method of changing a user account short name. This involves enabling the Root User, logging in as root, and then perform a few simple steps. I've done this many times before successfully on many different Macs. However on this particular MacBook Air, while I can enable root and enter the appropriate password via the "Other" choice at the 10.7 login screen, logging in as root fails. Here's what happens:

 

-- I enter username "root" and the appropriate password

-- it appears that the password is accepted

-- the Mac's screen turns blank as it usually does when one is ablout to enter a particular user account

-- Instead of the user desktop screen, the Mac simply returns to the login screen. There is no error message, etc. It simply fails to continue the login process to the root account.

 

I've tried changing the root password, resetting the PRAM, etc., and this behavior persists.

 

Any ideas?

 

thanks,

 

Eric


MacBook Pro, Mac OS X (10.7.3)
  • 1. Re: root login fails mac osx 10.7.3
    X423424X Level 6 Level 6 (14,190 points)

    Just to check you enabled the root user properly did you use the Directory Utility?

  • 2. Re: root login fails mac osx 10.7.3
    baltwo Level 9 Level 9 (60,115 points)

    AFAIK, you don't need to enable the root user account to change an account's short name. System Preferences->Users & Groups->unlock the lock->CONTROL-click on the appropriate user->select Advanced Options->change the shortname. I strongly advise making a backup before doing that. I've not enabled the root user account since OS X came out in 2001, but then I don't use FileVault or an Open Firmware password.

  • 3. Re: root login fails mac osx 10.7.3
    thedatadude Level 1 Level 1 (0 points)

    Yes.

  • 4. Re: root login fails mac osx 10.7.3
    thedatadude Level 1 Level 1 (0 points)

    Jun 29, 2012 11:38 PM (in response to thedatadude)

    AFAIK, you don't need to enable the root user account to change an account's short name. System Preferences->Users & Groups->unlock the lock->CONTROL-click on the appropriate user->select Advanced Options->change the shortname. I strongly advise making a backup before doing that. I've not enabled the root user account since OS X came out in 2001, but then I don't use FileVault or an Open Firmware password.

     

    Your method will only change the actual short name of a user. It will not affect the name of the user account home directory, which I wanted to also change.

     

    But the central issue I am asking about is why my attempts to login as Root repeatedly fail?

  • 5. Re: root login fails mac osx 10.7.3
    baltwo Level 9 Level 9 (60,115 points)

    But the central issue I am asking about is why my attempts to login as Root repeatedly fail?

    Can't help with that, since I've never enabled it. All I can point you to are these:

     

    http://support.apple.com/kb/ht1528

    https://discussions.apple.com/thread/3997967?start=0&tstart=0

    and http://support.apple.com/kb/HT1428 which was modified today.

     

    Good luck with your quest.

  • 6. Re: root login fails mac osx 10.7.3
    etresoft Level 7 Level 7 (24,270 points)

    Apple should know better than that. Try this corrected procedure instead:

     

    1. Create a new Administrator account
    2. Log in as the new Administrator account
    3. Run Terminal.app and enter the following commands:
    4. cd /Users
    5. sudo mv oldshortname newshortname
    6. Keep in mind that the shortname must be all lowercase, with no spaces, and only contain letters.
    7. Use the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier) in System Preferences to create a new user with the Account name or Short Name that you used in the previous step.
    8. Click OK when "A folder in the Users folder already has the name 'account name'. Would you like to use that folder as the Home folder for this user account?" appears. Note: This will correct the ownership of all files in the Home folder, and avoid permissions issues with the contents.
    9. Use the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier) in System Preferences to delete the old user
    10. Choose Log Out from the Apple menu.
    11. Log in as the newly created user. You should be able to access all of your original files (on the desktop, in Documents, and in the other folders of this Home).
    12. After verifying that your data is as expected, you can delete the original user account via the Users & Groups pane (Accounts pane in Mac OS X v10.6.8 or earlier).
  • 7. Re: root login fails mac osx 10.7.3
    baltwo Level 9 Level 9 (60,115 points)

    Thanks. Appears bug report worthy.

  • 8. Re: root login fails mac osx 10.7.3
    thedatadude Level 1 Level 1 (0 points)

    etresoft and baltwo:

     

    First of all - thanks for your efforts to help me.  I think I need to clarify:

     

    -- I know the proper procedure for enabling the Root user (it varies with the OS version), I do it all the time without problem.

     

    -- In this particular case, I was able successfully enable the Root. However, when I go to the login screen (which now includes an "Other") and properly enter the username(root) and password, the password is accepted, but the machine hesitates a moment before logging into the account, the screen goes blank very briefly, and then immediately returns to the login screen. I've never seen this behavior before. I am hoping someone could suggest why accessing the Root user account in this manner fails.

     

    -- For changing a user account name and its shortname, I am aware of the Terminal command method outlined by etresoft and will use that method if I have to, but I would prefer to use Apple's "approved" method, which involves actually logging into the Root user account from the OS UI.

  • 9. Re: root login fails mac osx 10.7.3
    etresoft Level 7 Level 7 (24,270 points)

    You won't find a bigger Apple fanboi than myself. One of the reasons I'm such a fan is because Apple turns about to be clever and correct so much of the time, including when I thought they were wrong. However, nobody, includig Apple, is perfect.

     

    This is one area where Apple really does need to fix something. The "Enable Root User" procedure is unnecessary, overly complex, and quite buggy in Lion. I think changing the short name may be the only reason Apple keeps publishing those instructions. Whatever the reason, those instructions need to go.

     

    At one time I filed an enhancement report for Apple to fix this procedure. I suggested Apple provide a feature like Windows' "Run as" command to run an application as Administrator or some other user. Apple responded by asking why I didn't just use "sudo". Obviously there is a disconnect at Apple regarding the "root user" issue. Someone at Apple has approved of that procedure, but nobody uses it. You shouldn't either.

  • 10. Re: root login fails mac osx 10.7.3
    etresoft Level 7 Level 7 (24,270 points)

    I just wrote a user tip for this procedure: https://discussions.apple.com/docs/DOC-3872

     

    Maybe that will spare a few people some trouble

  • 11. Re: root login fails mac osx 10.7.3
    thedatadude Level 1 Level 1 (0 points)

    Fair enough - thanks etresoft, I'll give your amended procedure a try.

     

    However, there are some cases where enabling Root and then logging in as Root are appropriate, correct? In that case, given the behavior I've described above, how would I login as Root?

  • 12. Re: root login fails mac osx 10.7.3
    Thane Peterson Level 1 Level 1 (0 points)

    Found on another site, I had the same issue with some new build 10.7.4 machines, the solution that worked for me was to delete the com.apple.security.plist file from the user home directory in my case it was root so I deleted the /var/root/Library/Preferences/com.apple.security.plist and I was able to login to the desktop were as previous I could not.

     

    From the Username and Password Login Window

     

    For the username type ">console" without the quotes but with the > greater-than sign.

    For the username leave blank and hit enter twice.

    at the login console type yor root username then enter and then your root password.

    then if the spelling is corect  "rm Library/Preferences/com.apple.security.plist"

    then type "exit" and it will return you to the login screen where if everything was successful you should be able to login as your root user..... at least I was.  I am sure everyone can exrapolate from this, remember the Library folder is hidden in 10.7 so if you are trying to brows to it you will not see it etc.

  • 13. Re: root login fails mac osx 10.7.3
    MacGenie.de Level 1 Level 1 (0 points)

    I had exactly the same problem, moving from snow-leopard 10.6.8 to lion 10.7.4

    (and it would be the same from snow-leopard to Mountain-Lion)

    I had (as always since 10.2) an activated root user. Whenever I log in as root - blank screen - nothing - back to login.

    What not helps is to deactivate or reactivate root user. But than I had another idea:

     

     

    The login-crashes is caused by an old Library

    activating / deactivation root user does not remove that directory

    you have to delete or rename it manually

     

     

    1. You have to login as root with the terminal.app

     

     

    login root

    Password:

     

     

    2. Delete the root-user Library (if it is still there)

    rm -r /private/var/root/Library

     

     

    2. If You do not want to delete it, You can also rename it (same result)

    mv /private/var/root/Library _old_Library

     

    (you could also try it with your admin user and the sudo command)

     

    Now everything works fine again. Even login in as root user :-)

  • 14. Re: root login fails mac osx 10.7.3
    NilesBrad Level 1 Level 1 (0 points)

    Deleting the /Library/Preferences/com.apple.security.plist file in the /var/root directory worked great for me!

1 2 Previous Next