Terminal & Host

Discussion in 'Mac OS X Lion (10.7)' started by antmarobel, Feb 28, 2011.

  1. antmarobel macrumors 6502


    May 8, 2009
    I'm having a problem to add lines in the host (Terminal ). Everytime I try to do it Mac says that I cannot do that because I'm not the owner ( that's the term in Portuguese I don't know how it is in English...) and offers me to make a copy of the host...Can someone help me here...:D
  2. carrako macrumors regular

    Nov 1, 2008
    You need to be logged in as a Root User in order to alter the host file inside Terminal or Text Editor.

    System Preferences > Users & Groups > Login Options > Join > "Open Directory Utility..."

    Inside Directory Utility - Click Edit>Enable Root User .... then create password for root user. Then click the Lock button to prevent further changes.

    Log Out of your account. Once at the Login screen, click "Other", then type root (lowercase) as the user name and then the password you just created. Once logged in as root, open the host file again and you should be able to add lines/edit and save the file. Log out of root and log back into your account (admin) and disable the root user account.

Share This Page