Don’t edit “/etc/resolv.conf” !

I saw this warning :

wou@ubuntu15-10:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.1

OK, so what I’m supposed to do ?

Use “resolvconf” utility instead

Logon as “root” :

wou@ubuntu15-10:~$ sudo bash
[sudo] password for wou:
root@ubuntu15-10:~# id
uid=0(root) gid=0(root) groups=0(root)

Add following lines in “/etc/network/interfaces” configuration file :

# The primary network interface
auto eno16777984
# old value for DHCP queries #iface eno16777984 inet dhcp
iface eno16777984 inet static
        address 192.168.1.202
        netmask 255.255.255.0
        gateway 192.168.1.1
        dns-nameservers 192.168.1.200
        dns-search argonay.wou

Restart “networking” serevice :

root@ubuntu15-10:~# service networking restart

That will update “/etc/resolv.conf” :

root@ubuntu15-10:~# cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.200
search argonay.wou

“nslookup” utility will show you the DNS server new I.P. address :

root@ubuntu15-10:~# nslookup
> server
Default server: 192.168.1.200
Address: 192.168.1.200#53
> exit

 

 

www.pdf24.org    Send article as PDF   

Leave a Reply

Your email address will not be published. Required fields are marked *


*