1834158 Members
2215 Online
110064 Solutions
New Discussion

Re: Modifying /etc/hosts

 
SOLVED
Go to solution
Arjun Kandasamy
Occasional Advisor

Modifying /etc/hosts

Hi


Can anyone confirm if there are issues with modifying /etc/hosts while a server is in use?


kind regards


AK
9 REPLIES 9
Jeff Schussele
Honored Contributor

Re: Modifying /etc/hosts

Hi AK,

Absolutely none at all.
It's used only as a lookup table.

Rgds,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Robert-Jan Goossens
Honored Contributor

Re: Modifying /etc/hosts

Nope not at all,

Just keep a copy in a save place.

Regards,
Robert-Jan
Pete Randall
Outstanding Contributor

Re: Modifying /etc/hosts

AK,

Should be absolutely no problem at all!


Pete

Pete
Marco Santerre
Honored Contributor

Re: Modifying /etc/hosts

You can modify /etc/hosts any time you want.

I've done it several times
Cooperation is doing with a smile what you have to do anyhow.
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: Modifying /etc/hosts

With the caveat that you don't introduce syntactic or logical errors to the hosts file then no there are no problems at all. The next gethostbyname() invoked by an application will immediately see the new host. If /etc/hosts is the map for NIS hosts then you must also invoke a ypmake to push the changes out.

If it ain't broke, I can fix that.
Sridhar Bhaskarla
Honored Contributor

Re: Modifying /etc/hosts

Hi AK,

I would not mind modifying /etc/hosts as long as I only add entries. I would think twice if I have to modify an existing entry as it may have an impact on the application. Some softwares like corba/tuxedo may not work unless you make changes on both ends of the connection.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
doug mielke
Respected Contributor

Re: Modifying /etc/hosts

A couple of notes:
/etc/hosts is read sequentially, so keep the localhost entry near the top, and remember that if there are duplicates. only the first one will be recognised.
Steven E. Protter
Exalted Contributor

Re: Modifying /etc/hosts

It depends what you do to it.

If you take out the loopback address 127.0.0.1 you can mess up the server quite badly.

If you change the ip address of the host, you can mess up networking as well.

If you are adding entries to /etc/hosts for other servers the impact is less drastic.

If you are new, make and test these changes in a maintenance window.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Arjun Kandasamy
Occasional Advisor

Re: Modifying /etc/hosts

Thanks for the replies. We maintain a centralised hosts file on one server and then rcp it across out other servers. On of my colleagues has noticed that during the time of the actual rcp we suffered a number of disconnects in the SAP/OMNI/PATROL logs. The changes we are making to the source hosts file are 99.9% to do with addition/deletion of entries for printers.

AK