Linux resetting hosts file after reboot


Friday
18 April, 2014
2289 Hits

Linux resetting hosts file after reboot

Oracle Technology

Are you having issues with your linux OS after installing Cisco Anyconnect and Oracle Database?
Most times we get a new system and configure tools like AnyConnect before installing our production/development kits like Oracle Database, Netbeans, as well as Application Servers.
AnyConnect will create a copy of the hosts file to /etc/hosts.ac and will always replace the original file after reboot or disconnection of the AnyConnect connection.

Each time you restart the operating system, the OS will reset the file and your Oracle Database will not startup and you need to modify the hosts file before starting the database instance.
Also, the file /etc/hosts gets reset every time you connect with Cisco AnyConnect.

To solve the issue permanently, the file hosts.ac should be modified. This file contains the default data that was in /etc/hosts file before installing AnyConnect. The file was created by Cisco AnyConnect and on every boot the content of the file /etc/hosts.ac is copied to the file /etc/hosts.

To modify the file, login as root or use sudo/su to make changes

gedit /etc/hosts.ac

Restart the Linux and verify the file /etc/hosts.

Note: This should be considered when you are using Cisco AnyConnect on the same Linux machine Oracle database is running on.

Enjoy your Linux!!!

  

This blog's content is intended solely for informational purposes. While every effort is made to ensure accuracy, completeness, and relevance, the information may not be current or applicable in all situations. The opinions expressed are solely those of the author and do not reflect the views of any organization they may be affiliated with.