From: Camaleón on
On Thu, 18 Mar 2010 22:09:40 +0100, Clive McBarton wrote:

> Camaleón wrote:

>>> My /etc/resolv.conf gets overwritten periodically. Any ideas why?
>>
>> Maybe because you are using a DHCP setup?
>
> Yes.

So you've got the response.

>> http://wiki.debian.org/
NetworkConfiguration#Definingthe.28DNS.29Nameservers
>
> That explains how the resolvconf program and network-manager can change
> /etc/resolv.conf. But I carefully deinstalled resolvconf and
> network-manager.

Uh? :-?

No, that explains how the "resolv.conf" can be changed by any "piece of
code" that needs to do so :-)

>> The C library and other resolver libraries look to /etc/resolv.conf for
>> a list of nameservers. In the simplest case, that is the file to edit
>> to set the list of name servers. *But note that various other programs
>> for dynamic configuration will be happy to overwrite your settings:*
>>
>> 1. The resolvconf program
>> 2. The network-manager daemon
>> 3. DHCP clients
>
> I assume that means dhcpd.

Correct.

> How do I stop it from changing resolv.conf?

Use a static network setup (that is, stop using DHCP). I do not use DHCP
and my "/etc/resolv.conf" never changes :-)

Now seriously, why do you care about "/etc/resolv.conf" being
automagically changed?

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/pan.2010.03.18.21.23.17(a)gmail.com
From: Ron Johnson on
On 2010-03-18 16:14, Clive McBarton wrote:
>
> To make my original question more precise: I want the stuff I write into
> resolv.conf to persist, but it does not have to be in that file. I'm
> happy to write things elsewhere as long as *some place* makes my changes
> persistent.
>

You must have missed the BIG BOLD LETTERS that tell you not to write
into resolv.conf by hand.

$ 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 xx.yy.zz.aa
nameserver xx.yy.zz.bb
search snagglefrob


--
Obsession with "preserving cultural heritage" is a racist impediment
to moral, physical and intellectual progress.


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4BA29E9C.3000007(a)cox.net
From: James Zuelow on

> -----Original Message-----
> From: Ron Johnson [mailto:ron.l.johnson(a)cox.net]
> Sent: Thursday, 18 March, 2010 13:44
> To: debian-user(a)lists.debian.org
> Subject: Re: why does resolv.conf change?
>
> On 2010-03-18 16:14, Clive McBarton wrote:
> >
> > To make my original question more precise: I want the stuff
> I write into
> > resolv.conf to persist, but it does not have to be in that file. I'm
> > happy to write things elsewhere as long as *some place*
> makes my changes
> > persistent.
> >
>
> You must have missed the BIG BOLD LETTERS that tell you not to write
> into resolv.conf by hand.
>
> $ 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 xx.yy.zz.aa
> nameserver xx.yy.zz.bb
> search snagglefrob
>

Well the OP can fix that. First, edit resolv.conf to look the way you want it to.

Then:

root(a)linux# chattr +i /etc/resolv.conf

If I follow the thread correctly the OP said that he uninstalled resolvconf.. After he makes /etc/resolv.conf immutable, whatever else wants to change resolv.conf and finds out that it can't will probably show up in the eventlog complaining.

Then the OP can find and either configure or get rid of the offending app.

James

--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4A09477D575C2C4B86497161427DD94C149F7885F6(a)city-exchange07
From: Ron Johnson on
On 2010-03-18 17:45, James Zuelow wrote:
>> -----Original Message-----
>> From: Ron Johnson [mailto:ron.l.johnson(a)cox.net]
>> Sent: Thursday, 18 March, 2010 13:44
>> To: debian-user(a)lists.debian.org
>> Subject: Re: why does resolv.conf change?
>>
>> On 2010-03-18 16:14, Clive McBarton wrote:
>>> To make my original question more precise: I want the stuff
>> I write into
>>> resolv.conf to persist, but it does not have to be in that file. I'm
>>> happy to write things elsewhere as long as *some place*
>> makes my changes
>>> persistent.
>>>
>> You must have missed the BIG BOLD LETTERS that tell you not to write
>> into resolv.conf by hand.
>>
>> $ 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 xx.yy.zz.aa
>> nameserver xx.yy.zz.bb
>> search snagglefrob
>>
>
> Well the OP can fix that. First, edit resolv.conf to look the way you want it to.
>
> Then:
>
> root(a)linux# chattr +i /etc/resolv.conf
>
> If I follow the thread correctly the OP said that he uninstalled resolvconf. After he makes /etc/resolv.conf immutable, whatever else wants to change resolv.conf and finds out that it can't will probably show up in the eventlog complaining.
>
> Then the OP can find and either configure or get rid of the offending app.
>

He should find and fix the root cause.

--
Obsession with "preserving cultural heritage" is a racist impediment
to moral, physical and intellectual progress.


--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4BA2AFC6.7010501(a)cox.net
From: James Zuelow on



> -----Original Message-----
> From: Ron Johnson [mailto:ron.l.johnson(a)cox.net]
> Sent: Thursday, 18 March, 2010 14:57
> To: debian-user(a)lists.debian.org
> Subject: Re: why does resolv.conf change?
>

> > Well the OP can fix that. First, edit resolv.conf to look
> the way you want it to.
> >
> > Then:
> >
> > root(a)linux# chattr +i /etc/resolv.conf
> >
> > If I follow the thread correctly the OP said that he
> uninstalled resolvconf. After he makes /etc/resolv.conf
> immutable, whatever else wants to change resolv.conf and
> finds out that it can't will probably show up in the eventlog
> complaining.
> >
> > Then the OP can find and either configure or get rid of the
> offending app.
> >
>
> He should find and fix the root cause.
>

He will.

"whatever else wants to change resolv.conf and finds out that it can't will probably show up in the eventlog complaining.

Then the OP can find and either configure or get rid of the offending app."

James

--
To UNSUBSCRIBE, email to debian-user-REQUEST(a)lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster(a)lists.debian.org
Archive: http://lists.debian.org/4A09477D575C2C4B86497161427DD94C149F7885F7(a)city-exchange07