NetInfo manager and HOST file in Leopard
It looks like in the upgrade to Leopard I lost NetInfo Manager which was a handy tool for editing and creating HOSTS.
From http://docs.info.apple.com/article.html?artnum=306494
NetInfo Manager is not included with Mac OS X 10.5 Leopard. You can use the command line utility dscl to perform some advanced functions formerly covered by NetInfo Manager. Open Terminal and type "dscl" to access it.So to create HOSTS with Leopard you are going to need to:
- From finder goto /etc/
- Find a file called hosts right-click (or command-i) to Get Info and make sure you have "Permission" to Read & Write to the file
- Next we need to edit out Apache httpd.conf file found at /etc/apache2/ and add the following line under where it says "Listen 80"
1 NameVirtualHost 127.0.0.1n.b. You might want to check if it exists first
- Then simply add your HOST information in the format of {IP Address}{tab}{host name}
TweetBacks
Your method, without step 3, works just fine. So does the dscl way:
sudo dscl localhost -create /Local/Default/Hosts/ridiculous.nonsense.monkeys IPAddress 192.168.0.1
Enter your password when asked, and you can now ping 192.168.0.1 with the name ridiculous.nonsense.monkeys
You can see the results of your work with:
dscl localhost -readall /Local/Default/Hosts
And to undo your handy-work:
sudo dscl localhost -delete /Local/Default/Hosts/ridiculous.nonsense.monkeys
P.S. You can see the results of your BSD flat-file method with this command:
dscl localhost -readall /BSD/local/Hosts
I just went to /etc did a "sudo vi hosts"
and added a line after 127.0.0.1 local
and everything worked after that