CA API Portal 4.2 - Search domain won't persist after reboot

Document ID : KB000113796
Last Modified Date : 10/10/2018
Show Technical Document Details
Issue:
Question: If I edit the resolv.conf file to change the search domain from "localdomain" to "mycomapny.domain.com" , the new setting won't persist after the VM reboot and the entry goes back to initial setup
 
Resolution:
Answer: resolv.conf is auto-populated by /usr/sbin/dhclient-script in phase of OS bootup. If DHCP is not used, changes have to be applied at the OS interface script in order to be persistent.

Edit the interface script and add a SEARCH entry like the example below:

SEARCH="example.com sub1.example.com sub2.example.com" 

1. Gain sudo control at the OS prompt: 

bash-4.2# sudo -s 

2. Edit the correct ifcfg-ethX script based on your interface, for example: 

bash-4.2# vi /etc/sysconfig/network-scripts/ifcfg-eth0 

Add a new search domain entry line, for example: 

SEARCH="mycompany.domain.com" 

3. Restart the network service (or reboot the OS) : 

bash-4.2# systemctl restart network