Home | Blog | Twitter @AndyJ | Contact Me | Snippets/Downloads | RSS

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:
  1. From finder goto /etc/
  2. 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
  3. 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"
       view plainprintabout
     NameVirtualHost 127.0.0.1
    n.b. You might want to check if it exists first
  4. Then simply add your HOST information in the format of {IP Address}{tab}{host name}
TweetBacks
Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
Ian Winter's Gravatar I was looking for Netinfo Manager yesterday. Is it now not part of Leopard at all? I haven't checked on my Macbook (clean install) but I know it's not on my Mac Mini (upgraded) install.
# Posted By Ian Winter | 11/1/07 9:52 AM
Andy J's Gravatar Nope it's gone. Check this link out (I'm going to add it to the post) http://docs.info.apple.com/article.html?artnum=306...
# Posted By Andy J | 11/1/07 10:01 AM
j0no's Gravatar I found this article looking up information about Netinfo in Leopard, so maybe I'm missing something, but what does editing your Apache httpd.conf file have to do with adding hosts to your hosts file?

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
# Posted By j0no | 11/11/07 8:01 PM
Howard's Gravatar I was wondering what the editing the Apache httpd.conf file was about too...

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
# Posted By Howard | 4/18/08 5:33 AM
kenk's Gravatar Thanks for article.I was looking for Netinfo Manager yesterday. Also,you can see this info at http://feedogator.com/search_feeds.php?q=NetInfo+m...
# Posted By kenk | 4/29/08 4:18 AM
BlogCFC / created by Raymond Camden / running version 5.9.5.003 / Contact AndyJarrett.com / Pet Rescue SOS www.redgiraffes.co.uk