[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Editing the DNS with Network Manager Non Root



On Fri 13 May 2022 at 15:02:35 (-0400), Greg Wooledge wrote:
> On Fri, May 13, 2022 at 11:53:23AM -0700, David Christensen wrote:
> > On 5/13/22 09:02, Richmond wrote:
> > > stat /etc/resolv.conf shows that the file has been updated but its
> > > content doesn't change.
> > 
> > My /etc/resolv.conf did not change after running Network Manager; it changed
> > after rebooting.  (Is the former a bug or a feature?)
> 
> Typically, if your system is running a DHCP client daemon to manage
> the addresses on any or all of your physical interfaces, the DHCP client
> daemon will rewrite the /etc/resolv.conf file whenever it feels like it.
> This could be each time the lease is renewed, or each time any piece of
> information received from the DHCP server has changed since the previous
> response, or... anything.
> 
> If you're fighting against your networking tools to maintain correct
> content in your /etc/resolv.conf file, I suggest starting with
> <https://wiki.debian.org/resolv.conf> which has details on some of
> the choices available to you.

… and I'm afraid that you have to be prepared for a fair amount of
confusion when you read this wiki and its companion:
https://wiki.debian.org/NetworkConfiguration

I'll refer to these wikis as RC and NC to avoid adding to the confusion.

So, for example, under the heading "Configuring resolvconf" on RC,
the second word is a link to the package "resolvconf". Fair enough.

But the next paragraph talks of the file "/etc/resolvconf.conf",
which has nothing to do with the resolvconf /package/, but is the
configuration file for the /openresolv/ package.

Both these packages actually perform their task with a shell script
in /sbin/resolvconf, so when you read something about the resolvconf
/program/, it's a toss-up which program they're talking about.

(And that's ignoring the fact that if you stray outside Debian's
documentation, you might discover that they're writing about, for
example, "openresolv" actually packaged up as "resolvconf".)

Turning to NC, under the heading "The resolv.conf configuration file"
there's a section headed "The resolvconf program". If you happened
to install the openresolv package, this is not about /your/ resolvconf
program: it's about the resolvconf /package's/ program, but it never
mentions that. (The word package doesn't appear anywhere.)

AFAICT the way in which you configure the two packages is completely
different, as one (openresolv) uses a .conf file, whereas the other
responds to information it's fed through stdin.

And I haven't checked thoroughly, but I don't see anything about
whether, and how, systemd impacts these packages, though I believe
that if you tell systemd that you're using "resolvconf" rather than
systemd-resolved, that suffices for either of (open)resolv(conf).

Cheers,
David.


Reply to: