I have an embedded system running a busybox distribution and for some reason i can't seem to find my dhclient.conf (http://www.freebsd.org/cgi/man.cgi?query=dhclient.conf&sektion=5) that would let me "protect" resolv.conf wt but DHCP still works, how could that be? Also, is there another way to protect the nameservers in resolv.conf?
Asked
Active
Viewed 1,281 times
3 Answers
2
chattr +i /etc/resolv.conf
will help you ;)
That turns special attributes to protect the file for deletion or modification.

Gilles Quénot
- 173,512
- 41
- 224
- 223
-
2That gives me this: # chattr +i /etc/resolv.conf chattr: reading flags on /etc/resolv.conf: Inappropriate ioctl for device my root disk is jffs2 not ext2 - that must be it – stdcerr May 29 '12 at 21:36
0
Creating a permission of this file.
chmod 0644 /etc/resolv.conf.
Owner can read and write. 6 Group can read. 4 Others can read. 4

John Rey Flores
- 187
- 14
-
but it belongs to root who is also trriggering the pppd call (frrom an init scrip on bootup...) :( is it feasible to make it chmod 444 ? – stdcerr May 29 '12 at 21:55
-
Oh I just see that it doesn't let me set it to anything else, it just stays at 777... hmmm – stdcerr May 29 '12 at 22:20
0
Just echoing my nameservers into /etc/resolv.conf after the dial up has been established....

stdcerr
- 13,725
- 25
- 71
- 128