Need to add entry in hosts file

M

marskarthik

Guest
hi,

I need to add entry in hosts file, for which it says not permitted message. Looks like i need root access, but i dont know the password for root. I have only one account set on this iMac and tried that password too. Can someone let me know how to add entry on the hosts file or enable root access.

Karthik
www.marskarthik.com
 
Joined
Aug 27, 2005
Messages
2,406
Reaction score
210
Points
63
Location
Fayetteville, AR
Your Mac's Specs
15" Powerbook G4 • 24" iMac • iPhone 3Gs
To enable root access you can download a program called PseudoX that let's you open any program as Root (in this case you'd open Finder).

Or you could do it from the command line by entering:

$ sudo -s

This however would limit you to command line and Terminal.
 
Joined
Feb 9, 2005
Messages
2,340
Reaction score
82
Points
48
Location
DFW
Your Mac's Specs
MacBook Pro 13" | MacBook Pro 13" | Mac Mini 2GHz C2D
I AM NOT RESPONSIBLE FOR ANY DAMAGE YOU OR MY INSTRUCTIONS WILL CAUSE

login as admin user

open terminal
type:
cp /etc/hosts /users/username/desktop/hosts.txt

go to your desktop and edit teh hosts file and save
go back to terminal

type:
sudo cp /users/username/desktop/hosts.txt /etc/hosts

it will ask you for a password
enter the admin password.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top