| View previous topic :: View next topic |
| Author |
Message |
bluewhite4 New Member

Joined: 21 Feb 2008 Posts: 5
|
Posted: Wed Aug 27, 2008 11:01 pm Post subject: Updating Hosts File |
|
|
| I have a couple SMB shares that are on my network, that I have created a script to auto-connect to. The problem seems to be that the mini doesn't recognize their dns name right away. I want to add them to the hosts file, since they won't ever change ip addresses anyway. I've found a tutorial on how to do that, but then it says that I need to use "sudo niload -v -m hosts . < /etc/hosts" to reload the database. However, it looks like in 10.5 that niload has been replaced. Does anyone have an updated command to fully refresh the dns cache for the hosts file? (That is without restarting the mini) |
|
| Back to top |
|
 |
Chris..S Veteran Member

Joined: 25 Feb 2007 Posts: 704
|
Posted: Thu Aug 28, 2008 5:27 am Post subject: |
|
|
| You don't need to. Editing /etc/hosts will be sufficient. Some software, like your web browser, will cache dns responses for a short time (a few minutes) but not too long. |
|
| Back to top |
|
 |
bluewhite4 New Member

Joined: 21 Feb 2008 Posts: 5
|
Posted: Thu Aug 28, 2008 6:51 am Post subject: It doesn't seem to.... |
|
|
| After I edit the hosts file, if I try to ping that name, it doesn't ping the correct address from that terminal session or another though. |
|
| Back to top |
|
 |
Chris..S Veteran Member

Joined: 25 Feb 2007 Posts: 704
|
Posted: Thu Aug 28, 2008 8:54 am Post subject: |
|
|
Using ping in iTerm, works fine and instantly for me.
|
|
| Back to top |
|
 |
miniconvert Senior Member

Joined: 30 Sep 2007 Posts: 383
|
Posted: Fri Sep 05, 2008 3:39 pm Post subject: |
|
|
What does your hosts file look like? _________________ Intel Mac Mini, 1.83 C2D 2.5GB, 80GB, Combo Drive
Graphite G3 iMac DV SE, 400Mhz, 512MB, 30GB
iPod Touch (1st Gen) |
|
| Back to top |
|
 |
Chris..S Veteran Member

Joined: 25 Feb 2007 Posts: 704
|
Posted: Fri Sep 05, 2008 4:21 pm Post subject: |
|
|
/etc/hosts
| Code: |
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost
127.0.0.1 computername
127.0.0.1 computername.mydomain.tld
192.168.0.3 othercomputername
# spam/ad/popup protection
127.0.0.1 ctr.andale.com
# ... lots more of these
|
|
|
| Back to top |
|
 |
|