ITatES
asked on
editing mac osx 10.4 hosts file
Hi, I've been trying in vain to edit the mac osx hosts file. I've tried the following so far:
edit the host file in /etc: I put in the ip address and the website address all the way at the bottom of the file and save it. Then I do the following as instructed on several websites:
$ sudo niutil -create . /locations/lookupd/hosts
$ sudo niutil -createprop . /locations/lookupd/hosts LookupOrder FFAgent DNSAgent
$ sudo killall lookupd
After all this, i even restarted the machine, and it still doesn't work. Any ideas?
edit the host file in /etc: I put in the ip address and the website address all the way at the bottom of the file and save it. Then I do the following as instructed on several websites:
$ sudo niutil -create . /locations/lookupd/hosts
$ sudo niutil -createprop . /locations/lookupd/hosts LookupOrder FFAgent DNSAgent
$ sudo killall lookupd
After all this, i even restarted the machine, and it still doesn't work. Any ideas?
ASKER
yes,
192.158.1.24 www.blahblah.com
I add that line to the hosts file and save it. It doesn't work when typing in www.blahblah.com in the browser. I read on a couple of websites that osx doesn't go to hosts file by default so you need to modify the lookupd for it to do that, and hence i tried the commands listed above. Still it doesn't work.
192.158.1.24 www.blahblah.com
I add that line to the hosts file and save it. It doesn't work when typing in www.blahblah.com in the browser. I read on a couple of websites that osx doesn't go to hosts file by default so you need to modify the lookupd for it to do that, and hence i tried the commands listed above. Still it doesn't work.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
strung, I went to that exact same site and tried the exact same thing.
Sullivan, I had a tab before, but that didn't work so I changed it to a space.
I saved the hosts file by first saving it on desktop and then replacing the one in /etc by the new saved one. When I replaced, it asked for the admin password to overwrite and i entered it.
Sullivan, I had a tab before, but that didn't work so I changed it to a space.
I saved the hosts file by first saving it on desktop and then replacing the one in /etc by the new saved one. When I replaced, it asked for the admin password to overwrite and i entered it.
What program did you use to edit the hosts file? If it was TextEdit on OSX you may have corrupted the file format and the hosts file will not work.
Can you restore a clean original of the hosts file and start again using the Terminal commands I provided?
Can you restore a clean original of the hosts file and start again using the Terminal commands I provided?
2. Can you supply the line you are adding to the hosts file? Obfuscate if necessary