Why automatic tools can change /etc/resolv.conf?

2001-08-01 Thread Michele Dalla Silvestra
A little question. Only the Root (the human) should modify a file in /etc,
and dpkg ask when it may change a config file. This should be good.

For /etc/resolv.conf, instead, many programs pretend to modify it (script
from pppd, dhcp-client and so on).

But for use dynamic dns server one can use dnrd, that can connect to various
DNS servers dynamically without modify any file!


If is not possible to put dnrd in any installation, why not modify a file
like resolv.conf in /var/somewhat and make a symlink in /etc/resolv.conf? If
an administrator want to make him change in /etc/resolv.conf and be sure
that a program not modify it, he remove the symlink and create his
resolv.conf.


ciao

Michele



Re: Why automatic tools can change /etc/resolv.conf?

2001-08-01 Thread Sebastiaan
On Wed, 1 Aug 2001, Michele Dalla Silvestra wrote:

 A little question. Only the Root (the human) should modify a file in /etc,
 and dpkg ask when it may change a config file. This should be good.
 
 For /etc/resolv.conf, instead, many programs pretend to modify it (script
 from pppd, dhcp-client and so on).
 
 But for use dynamic dns server one can use dnrd, that can connect to various
 DNS servers dynamically without modify any file!
 
 
 If is not possible to put dnrd in any installation, why not modify a file
 like resolv.conf in /var/somewhat and make a symlink in /etc/resolv.conf? If
 an administrator want to make him change in /etc/resolv.conf and be sure
 that a program not modify it, he remove the symlink and create his
 resolv.conf.
 
 
Be sure you do not have the option 'usepeerdns' enabled in pppd options.

Greetz,
Sebastiaan




Re: Why automatic tools can change /etc/resolv.conf?

2001-08-01 Thread Michele Dalla Silvestra
On Wed, Aug 01, 2001 at 05:38:58PM +0200, Sebastiaan wrote:
 On Wed, 1 Aug 2001, Michele Dalla Silvestra wrote:
  If is not possible to put dnrd in any installation, why not modify a file
  like resolv.conf in /var/somewhat and make a symlink in /etc/resolv.conf? If
  an administrator want to make him change in /etc/resolv.conf and be sure
  that a program not modify it, he remove the symlink and create his
  resolv.conf.
  
 Be sure you do not have the option 'usepeerdns' enabled in pppd options.

Yes, in fact I know that pppd (if I use 'usepeerdns') change
/etc/resolv.conf, but also dhcp-client change it, and I don't know if other
packages do so.

But is correct that an application change /etc/resolv.conf even if the
administrator write it entirely by hand?

How can I prevent it?


ciao

Michele



Re: Why automatic tools can change /etc/resolv.conf?

2001-08-01 Thread Guy Geens
 Michele == Michele Dalla Silvestra [EMAIL PROTECTED] writes:

Michele But is correct that an application change /etc/resolv.conf
Michele even if the administrator write it entirely by hand?

Both pppd and dhclient can receive information about available DNS
servers, and they will try to make that available to other
applications (by adapting /etc/resolv.conf).

Pppd is even nice enough to revert to the original file after
disconnecting.

Michele How can I prevent it?

For pppd, the answer has already been mentioned. If you want to
prevent dhclient from changing /etc/resolv.conf, create a file
/etc/dhclient-enter-hooks with the following contents (it should be
executable):

# redefine the function which changes resolv.conf to do nothing
make_resolv_conf() {}

-- 
G. ``Iggy'' Geens - ICQ: #64109250
Home: [EMAIL PROTECTED] - Work: [EMAIL PROTECTED]
WWW: http://users.pandora.be/guy.geens/
`I want quality, not quantity. But I want lots of it!'