9 Replies to "How to Create a Hidden Admin Account in Lion"

  • Marc Johnson

    I have created this user but am having trouble adding this user to Remote Management and remote login, this is what the hidden user was created for, any ideas ????

  • Hi Marc, you have to add the user to Remote Management before you hide it. Probably easier if you delete the user you created and create it again.

  • Marc Johnson

    Ahh, I spotted the advanced user option, removed . and now setup SSH and ARD put the . back under username and put a . in-front of the home folder, BINGO! completely hidden.

    • Hi Dean

      I have just had a go at reversing this and here is what I did.

      My setup was the same as the blog.

      Login to the machine as an Admin
      Open terminal
      Type sudo -s and use the Admin password
      This makes you the root user, the prompt should end with a #, something like this.
      Now type dscl
      Now type cd Local/Default/Users/
      You can type ls
      This lists the users on your machine
      now type change .hidden RecordName .hidden unhidden
      this changes the .hidden user to unhidden so the the user will show up in System Preferences. Type q to exit dscl
      If you want to make the home folder visible you can now do this in the Users & Groups Preference pane by ctrl clicking the Hidden Admin, select the Advanced Options and remove the . from the Home Directory.

      Hope this helps


      • Mark

        Hi Pete,

        Please clarify the script for reversing a hidden account. I followed your script, but it tells me that there’s an Invalid Path in the 4th step (**).

        sudo -s
        cd Local/Default/Users/
        **change .hidden “___” .hidden unhidden

        Thank you!

  • Mark

    I’ve also made sure to both substitute the “RecordName” with the username containing the period, e.g. (.User1) and without it as well (User1).

  • Anthony

    Last line should be…

    change .hidden RecordName .hidden unhidden

    where .hidden is is the short name of the hidden account and unhidden is the name you want it to be. For example, if my hidden user is .david and I want the user’s unhidden shortname changed to charles, the last line would be…

    change .david RecordName .david charles

Leave a Reply

Your email address will not be published. Required fields are marked *