PDA

View Full Version : Terminal & Host




antmarobel
Feb 28, 2011, 05:07 PM
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



carrako
Feb 28, 2011, 05:42 PM
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

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.