- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- host file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2004 05:49 AM
03-04-2004 05:49 AM
How to reload host file without server reboot.
We tried /usr/sbin/inetd -c: no result...
Can you tell me which command can we use?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2004 05:52 AM
03-04-2004 05:52 AM
Re: host file
Can you give us more details?. If you are talking about /etc/hosts, then there is no need to restart everything. The new entry will be picked up by all the subsequent gethostbyname|addr calls. TO verify it use
'nslookup host_name' command.
Also make sure you have files appearing as the first option in your /etc/nsswtich.conf.
If you are not talking about /etc/hosts, then you can ignore this entire message.
-Sri
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2004 05:52 AM
03-04-2004 05:52 AM
Solutiontu ne serais pas suppose d'avoir besoin de rebooter le serveur si tu ne fais qu'un changement a l'interieur de ton /etc/hosts. A partir du moment ou ton /etc/hosts est change, le changement est automatique.
Le probleme reside peut-etre de la maniere dont tu resous les adresses par contre. Comment est-ce que tu resous les adresses (regarde ton fichier /etc/nsswitch.conf) Si tu regardes files en premier, et que tu fais un ping sur le nom (ou l'adresse) que tu as change tu devrais resoudre a la nouvelle adresse.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2004 05:55 AM
03-04-2004 05:55 AM
Re: host file
The problem may be that you have and /etc/resolv.conf file which is telling the computer to look at a different source rather then the /etc/hosts file.
Best regards,
Kent M. Ostby
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2004 05:57 AM
03-04-2004 05:57 AM
Re: host file
-Hazem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2004 06:03 AM
03-04-2004 06:03 AM
Re: host file
Like:
hosts: files [NOTFOUND=CONTINUE] dns
Or: hosts: dns
If the latter - then it won't read /etc/hosts at all....
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2004 06:03 AM
03-04-2004 06:03 AM
Re: host file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2004 06:07 AM
03-04-2004 06:07 AM
Re: host file
Mine generally look like this:
# ll /etc/nsswitch.conf
-rw-r--r-- 1 root sys 345 Jul 2 1998 /etc/nsswitch.conf
# cat /etc/nsswitch.conf
hosts: files[NOTFOUND=continue UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]
protocols: files[NOTFOUND=return UNAVAIL=return]
services: files[NOTFOUND=return UNAVAIL=return]
networks: files[NOTFOUND=return UNAVAIL=return]
netgroup: files[NOTFOUND=return UNAVAIL=return]
rpc: files[NOTFOUND=return UNAVAIL=return]
The line you are most concerned about is the first line (the hosts: line). Mine checks the local /etc/hosts first and then looks to DNS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2004 06:16 AM
03-04-2004 06:16 AM
Re: host file
Marco did indeed point to nsswitch.conf.
No points here.
You should be all set with the given answers.
Best regards,
dl
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2004 08:02 PM
03-04-2004 08:02 PM
Re: host file
Also use /etc/resolve.conf for indicate wich dns server to use :
domain XX.YYYY.fr
search XX.YYYY.fr
nameserver1 128.240.229.18
nameserver2 128.240.229.34
You can use nslookup and nsquery to verify the host resolution (#nsquery hosts hostname_to_resolve )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2004 09:40 PM
03-04-2004 09:40 PM
Re: host file
The order of name resolution is first any name call looks up the local hosts file and in the event that the host entry is not present in the local hosts file, then it will lookup your DNS server.
Your local hosts file will be at /etc/hosts
So if you would need to add in an entry for a host, you can just edit this file and add in that entry.
No reboot is needed after doing this, as after you are done editing the hosts file, any lookups to the host you added will be looked into the /etc/hosts file before going to your DNS server
I hope i have been clear
regards
Mobeen