# Manual DNS server info update

**URL:** <https://forums.suse.com/t/manual-dns-server-info-update/28409>\
**Category:** SLES Networking\
**Created:** [July 12, 2016, 1:39am UTC](https://forums.suse.com/t/manual-dns-server-info-update/28409 "2016-07-12T01:39:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jerry98](https://avatars.discourse-cdn.com/v4/letter/j/bc8723/32.png) [@jerry98](https://forums.suse.com/u/jerry98)\
**Post date:** [July 12, 2016, 1:39am UTC](https://forums.suse.com/t/manual-dns-server-info-update/28409/1 "2016-07-12T01:39:52Z")

</div>

Hello,

In [https://www.suse.com/documentation/sles-12/book\_sle\_admin/data/sec\_basicnet\_manconf.html](https://www.suse.com/documentation/sles-12/book_sle_admin/data/sec_basicnet_manconf.html),  
the /etc/resolv.conf should not be edited by hand. Instead, it is generated by the netconfig script. To define static DNS configuration without using YaST, edit the appropriate variables manually in the /etc/sysconfig/network/config file.

So I edited like  
NETCONFIG\_DNS\_STATIC\_SERVERS=“4.2.2.2”

systemctl restart wicked  
cat /etc/resolv.conf

However I don’t see the change in /etc/resolv.conf

Then I ran /sbin/netconfig update  
And the output says : Attention: you have modified /etc/resolv/conf. Leaving it untouched. You can find my version in /etc/resolv.conf.netconfig (which contains the DNS server I added in /etc/sysconfig/network/config file).

I think I edited /etc/resolv.conf manually before the /etc/sysconfig/network/config test.

So at this point, if I would need to update DNS server info again, should I continue to edit /etc/resolv.conf manually or /etc/sysconfig/network/config?

Thanks,  
Jerry

---

<div class="post-metadata">

**Author:** ![Jens-U](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jens-U](https://forums.suse.com/u/Jens-U)\
**Post date:** [July 12, 2016, 5:09pm UTC](https://forums.suse.com/t/manual-dns-server-info-update/28409/2 "2016-07-12T17:09:07Z")

</div>

Hi Jerry,

[QUOTE=jerry98;33436]Hello,

In [https://www.suse.com/documentation/sles-12/book\_sle\_admin/data/sec\_basicnet\_manconf.html](https://www.suse.com/documentation/sles-12/book_sle_admin/data/sec_basicnet_manconf.html),  
the /etc/resolv.conf should not be edited by hand. Instead, it is generated by the netconfig script. To define static DNS configuration without using YaST, edit the appropriate variables manually in the /etc/sysconfig/network/config file.

So I edited like  
NETCONFIG\_DNS\_STATIC\_SERVERS=“4.2.2.2”

systemctl restart wicked  
cat /etc/resolv.conf

However I don’t see the change in /etc/resolv.conf

Then I ran /sbin/netconfig update  
And the output says : Attention: you have modified /etc/resolv/conf. Leaving it untouched. You can find my version in /etc/resolv.conf.netconfig (which contains the DNS server I added in /etc/sysconfig/network/config file).

I think I edited /etc/resolv.conf manually before the /etc/sysconfig/network/config test.

So at this point, if I would need to update DNS server info again, should I continue to edit /etc/resolv.conf manually or /etc/sysconfig/network/config?[/QUOTE]

you can run “/sbin/netconfig -f update” to force replacing the files with the generated version. I’d recommend to do so and stay with modifying /etc/sysconfig/network/config.

Regards,  
J
