- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- /etc/hosts Changed after server's reboot
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
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
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
06-25-2013 03:02 AM - last edited on 06-25-2013 06:22 PM by Maiko-I
06-25-2013 03:02 AM - last edited on 06-25-2013 06:22 PM by Maiko-I
/etc/hosts Changed after server's reboot
Hi All,
I faced a problem every time i reboot my server, the corresponding entry of my server on its local /etc/hosts is being changed and the FQDN is removed, Example:
Server RLRSDB:
#hostname
RLRSDB
#uname -n
RLRSDB
RLRSDB:/#pg /etc/hosts
127.0.0.1 localhost loopback
192.168.1.20 rlrs01.sysinf.one.intra rlrs01
192.168.1.21 rlrs02.sysinf.one.intra rlrs02
192.168.1.22 rlrs03.sysinf.one.intra rlrs03
192.168.1.23 rlrsdb.sysinf.one.intra rlrsdb
-->After reboot the '/etc/hosts' will b like this:
127.0.0.1 localhost loopback
192.168.1.23 rlrsdb
192.168.1.20 rlrs01.sysinf.one.intra rlrs01
192.168.1.21 rlrs02.sysinf.one.intra rlrs02
192.168.1.22 rlrs03.sysinf.one.intra rlrs03
Any help?
P.S. This thread has been moved from Servers > Integrity Servers to HP-UX > networking - HP Forum Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2013 08:05 AM
06-25-2013 08:05 AM
Re: /etc/hosts Changed after server's reboot
Hi Moderator,
Please move this post to HPUX - System Adminsitration.
Thank you
[Any personal opinions expressed are mine, and not official statements on behalf of Hewlett Packard Enterprise]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2013 09:57 AM
06-25-2013 09:57 AM
Re: /etc/hosts Changed after server's reboot
Perhaps a script is running at startup that is checking and modifying the host file? Does this happen if you boot into single-user mode?
-Bob
Was this helpful? Like this post by giving me a thumbs up below!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2013 09:59 AM
06-25-2013 09:59 AM
Re: /etc/hosts Changed after server's reboot
Check your startup scripts in /sbin/init.d and see if there is anything there that is modifying the hosts file.
A start may be doing something like:
# cd /sbin/init.d
# grep /etc/hosts *
to look for any occurrences of /etc/hosts in the files in /sbin/init.d. If you find anything then you will need to investigate that file further to see what it is doing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2013 05:04 AM
06-28-2013 05:04 AM
Re: /etc/hosts Changed after server's reboot
/sbin/init.d#grep /etc/hosts *
swconfig:# if /etc/hosts is saved, set to the empty
swconfig: msg star "Setting up temporary hostname in '/etc/hosts'"
swconfig: Hosts_Saved="/etc/hosts.swconfig.$$"
swconfig: mv -f /etc/hosts ${Hosts_Saved}
swconfig: msg error "Failed to save '/etc/hosts'"
swconfig: { print }' < ${Hosts_Saved} > /etc/hosts
swconfig: in '/etc/hosts'."
swconfig:# unhack_hostname - undo /etc/hosts changes
swconfig:# the contents of /etc/hosts
swconfig: msg star "Restoring '/etc/hosts' to its original contents."
swconfig: mv -f ${Hosts_Saved} /etc/hosts
swconfig: msg error "Unable to restore '/etc/hosts' file
swm.config:# if /etc/hosts is saved, set to the empty
swm.config: msg star "Setting up temporary hostname in '/etc/hosts'"
swm.config: Hosts_Saved="/etc/hosts.swconfig.$$"
swm.config: mv -f /etc/hosts ${Hosts_Saved}
swm.config: msg error "Failed to save '/etc/hosts'"
swm.config: { print }' < ${Hosts_Saved} > /etc/hosts
swm.config: in '/etc/hosts'."
swm.config:# unhack_hostname - undo /etc/hosts changes
swm.config:# the contents of /etc/hosts
swm.config: msg star "Restoring '/etc/hosts' to its original contents."
swm.config: mv -f ${Hosts_Saved} /etc/hosts
swm.config: msg error "Unable to restore '/etc/hosts' file