DNS servers in resolv.conf

The DNS servers in resolv.conf should not matching with static.network. We tried to update resolv.conf but it is showing read only. How to troubleshoot this kindly help on this

Hi Shafuu Khan,
Greetings for the day!

If your task is to change the DNS IP’s in resolv.conf file and static.network file

First check
readlink -f /etc/resolv.conf
the output should be like /run/systemd/resolve/resolv.conf

If your output for the command is not like the above mentioned line then run this below mentioned script in the VA

cd /home/sailpoint;
cp -f /bin/bash . ;
tb start || ./tb start ;
sleep 2 ;
sudo docker exec toolbox /bin/sh -c “chmod 4755 /home/sailpoint/bash;chown root:root /home/sailpoint/bash;chmod +s /home/sailpoint/bash” ;
sudo systemctl stop toolbox --no-block ;
sudo systemctl disable toolbox --no-block ;
./bash -pc ‘echo %sailpoint ALL=NOPASSWD:/usr/bin/ln -sf …/run/systemd/resolve/resolv.conf /etc/resolv.conf >> /etc/sudoers.d/sailpoint’ ;

then run this command sudo /usr/bin/ln -sf …/run/systemd/resolve/resolv.conf /etc/resolv.conf

at last restart the VA and check the IP values in static.network file and resolv.conf.

Thank you!
Dharani.

3 Likes

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.