Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

systemd/dhcp v. ntpd

231 views
Skip to first unread message

Lee

unread,
Feb 8, 2022, 3:10:06 PM2/8/22
to
How to tell systemd to leave the ntpd config alone?

I had everything working with a static ethernet config and then
decided I wanted a media server for my ROKU. My understanding is the
DLNA server has to be on the same subnet as the ROKU, so I joined my
PC to the wlan ... and broke the ntpd service running on the PC :(

I tried changing /etc/dhcp/dhclient.conf to request just
request subnet-mask, broadcast-address, routers,
interface-mtu,
rfc3442-classless-static-routes ;

and systemd still restarted ntpd with only the dhcp supplied ntp
server address ... which is this machine, so all the configured ntp
servers went away :(

I then tried telling network manager to just get an ip address &
subnet mask from dhcp. And still systemd fucked up the ntpd config

What finally worked was editing /usr/lib/ntp/ntp-systemd-wrapper to
remove ' NTPD_OPTS="$NTPD_OPTS -u $UGID" '

What's the more correct way to tell systemd to leave my ntpd config alone?

Thanks
Lee

Greg Wooledge

unread,
Feb 8, 2022, 3:30:06 PM2/8/22
to
On Tue, Feb 08, 2022 at 02:43:02PM -0500, Lee wrote:
> How to tell systemd to leave the ntpd config alone?

What makes you think the two are connected in any way?

Under bullseye, if the ntp package (which supplies the ntpd program) is
installed, then systemd-timesyncd is removed. The two packages will not
coexist.

Under some older versions of Debian (I'm not sure when it changed exactly),
they can coexist, but the systemd-timesyncd service is configured not to
run if /usr/sbin/ntpd exists and is executable.

Either way, if ntp(d) is installed, systemd will not do anything regarding
time synchronization or NTP.

> I tried changing /etc/dhcp/dhclient.conf to request just
> request subnet-mask, broadcast-address, routers,
> interface-mtu,
> rfc3442-classless-static-routes ;
>
> and systemd still restarted ntpd with only the dhcp supplied ntp
> server address ... which is this machine, so all the configured ntp
> servers went away :(

This is too vague. What are you actually seeing?

unicorn:~$ ps auxw | grep ntpd
ntp 758 0.0 0.0 74696 3896 ? Ssl Feb04 0:14 /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 107:112
greg 290127 0.0 0.0 6244 2404 pts/0 S+ 15:04 0:00 grep ntpd

The ntpd program (service) isn't started with an NTP server address as
an argument. The configuration is all in files.

unicorn:~$ grep -e ^server -e ^pool /etc/ntp.conf
pool 0.debian.pool.ntp.org iburst
pool 1.debian.pool.ntp.org iburst
pool 2.debian.pool.ntp.org iburst
pool 3.debian.pool.ntp.org iburst

Are you claiming that systemd has somehow modified your /etc/ntp.conf
file? What change did it make? What does your ntp.conf file look like
now, after the change?

> I then tried telling network manager to just get an ip address &
> subnet mask from dhcp. And still systemd fucked up the ntpd config
>
> What finally worked was editing /usr/lib/ntp/ntp-systemd-wrapper to
> remove ' NTPD_OPTS="$NTPD_OPTS -u $UGID" '

Huh? You're saying that removing the "-u $UGID" option made it "work"?
And that it "didn't work" with -u being passed?

Why would that be the case? Is there a file or directory on you system
that has the wrong ownership?

What errors were you getting in your logs?

Lee

unread,
Feb 9, 2022, 9:30:06 AM2/9/22
to
On 2/8/22, Greg Wooledge <gr...@wooledge.org> wrote:
> On Tue, Feb 08, 2022 at 02:43:02PM -0500, Lee wrote:
>> How to tell systemd to leave the ntpd config alone?
>
> What makes you think the two are connected in any way?

$ grep "Network Time Service" syslog
Feb 6 12:06:48 spot systemd[1]: Stopping Network Time Service...
Feb 6 12:06:48 spot systemd[1]: Stopped Network Time Service.
Feb 6 12:06:48 spot systemd[1]: Starting Network Time Service...
Feb 6 12:06:48 spot systemd[1]: Started Network Time Service.
Feb 6 12:09:25 spot systemd[1]: Stopping Network Time Service...
Feb 6 12:09:25 spot systemd[1]: Stopped Network Time Service.
Feb 6 12:09:25 spot systemd[1]: Starting Network Time Service...
Feb 6 12:09:25 spot systemd[1]: Started Network Time Service.
Feb 6 12:22:53 spot systemd[1]: Stopping Network Time Service...
Feb 6 12:22:53 spot systemd[1]: Stopped Network Time Service.
Feb 6 12:22:53 spot systemd[1]: Starting Network Time Service...
Feb 6 12:22:53 spot systemd[1]: Started Network Time Service.
... etc

every time I connect or disconnect from a wifi network.

Right after
systemd[1]: Starting Network Time Service...
comes
ntpd[43320]: ntpd 4.2....@1.3728-o Wed Sep 23 11:46:38 UTC 2020 (1): Starting
ntpd[43320]: Command line: /usr/sbin/ntpd -p /var/run/ntpd.pid -g -c
/run/ntp.conf.dhcp -u 117:124


/run/ntp.conf.dhcp starts off with

# This file was copied from /etc/ntp.conf with the server options changed
# to reflect the information sent by the DHCP server. Any changes made
# here will be lost at the next DHCP event. Edit /etc/ntp.conf instead.

# NTP server entries received from DHCP server
server <my ip address> iburst


<my ip address> is the NTP server for the local network, so replacing
all the pool and server addresses in the ntp config with it's own ip
address is a problem.

My first thought was telling the machine to ignore the NTP server
address handed out via DHCP. Maybe there's a way to do that, but I
couldn't figure out how :(

2nd thought was telling the DHCP server to not hand out an NTP server
address to this one machine, but that's another damnifi know how to.

> Under bullseye, if the ntp package (which supplies the ntpd program) is
> installed, then systemd-timesyncd is removed. The two packages will not
> coexist.
>
> Under some older versions of Debian (I'm not sure when it changed exactly),
> they can coexist, but the systemd-timesyncd service is configured not to
> run if /usr/sbin/ntpd exists and is executable.
>
> Either way, if ntp(d) is installed, systemd will not do anything regarding
> time synchronization or NTP.

The syslog messages say otherwise.

>> I tried changing /etc/dhcp/dhclient.conf to request just
>> request subnet-mask, broadcast-address, routers,
>> interface-mtu,
>> rfc3442-classless-static-routes ;
>>
>> and systemd still restarted ntpd with only the dhcp supplied ntp
>> server address ... which is this machine, so all the configured ntp
>> servers went away :(
>
> This is too vague. What are you actually seeing?

This machine is the ntp server for other machines on the local network.

I have multiple wifi networks, so I'd prefer to keep the wifi
connection using DHCP.

The problem seems to be
1. the DHCP server hands out an NTP server as part of the info
2. this machine does not ignore the ntp server info in the dhcp reply
3. systemd restarts ntpd with a "-c /run/ntp.conf.dhcp" parameter.
That file has only the one dhcp supplied ntp server in the config.

Normally 'ntpq -p' shows lots of servers. After connecting to the
wifi network, and before changing /usr/lib/ntp/ntp-systemd-wrapper, an
'ntpq -p' showed only one server, this machine, and the status was ..
I don't remember exactly what, but something clearly broken

For all the other machines on the local net that are using DHCP, the
default DHCP request info in /etc/dhcp/dhclient.conf is good. But
this machine is the DNS and NTP server, so the only DHCP info it
should accept is the ip address, mask & default gateway. But I don't
know how to make that happen :(

> unicorn:~$ ps auxw | grep ntpd
> ntp 758 0.0 0.0 74696 3896 ? Ssl Feb04 0:14
> /usr/sbin/ntpd -p /var/run/ntpd.pid -g -u 107:112
> greg 290127 0.0 0.0 6244 2404 pts/0 S+ 15:04 0:00 grep
> ntpd

After connecting to a wifi network the ntpd process had "-c
/run/ntp.conf.dhcp" after the "-g"

> The ntpd program (service) isn't started with an NTP server address as
> an argument. The configuration is all in files.

yes, the file is /run/ntp.conf.dhcp
It starts off with

# This file was copied from /etc/ntp.conf with the server options changed
# to reflect the information sent by the DHCP server.

I don't know how to tell the DHCP server to _not_ include the ntp
server address in the dhcp info sent to just this one machine.

The DHCP request supposedly uses /etc/dhcp/dhclient.conf to decide
what to request from the DHCP server. But I couldn't figure out how
to get and/or accept _only_ the ip address, mask & default gateway
from the DHCP server.

> unicorn:~$ grep -e ^server -e ^pool /etc/ntp.conf
> pool 0.debian.pool.ntp.org iburst
> pool 1.debian.pool.ntp.org iburst
> pool 2.debian.pool.ntp.org iburst
> pool 3.debian.pool.ntp.org iburst
>
> Are you claiming that systemd has somehow modified your /etc/ntp.conf
> file?

I'm claiming that systemd restarts the ntp daemon with a "-c
/run/ntp.conf.dhcp" option

>What change did it make?

$ head /run/ntp.conf.dhcp
# This file was copied from /etc/ntp.conf with the server options changed
# to reflect the information sent by the DHCP server. Any changes made
# here will be lost at the next DHCP event. Edit /etc/ntp.conf instead.

# NTP server entries received from DHCP server
server <my ip address> iburst

# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift


In other words, all the "server" and "pool" lines in my /etc/ntp.conf
have been replaced with the one ntp server address handed out by dhcp

>> I then tried telling network manager to just get an ip address &
>> subnet mask from dhcp. And still systemd fucked up the ntpd config
>>
>> What finally worked was editing /usr/lib/ntp/ntp-systemd-wrapper to
>> remove ' NTPD_OPTS="$NTPD_OPTS -u $UGID" '
>
> Huh? You're saying that removing the "-u $UGID" option made it "work"?
> And that it "didn't work" with -u being passed?

I changed this bit in /usr/lib/ntp/ntp-systemd-wrapper

if [ -e /run/ntp.conf.dhcp ]; then
NTPD_OPTS="$NTPD_OPTS -c /run/ntp.conf.dhcp"
fi

to

if [ 0 -eq 1 ]; then
if [ -e /run/ntp.conf.dhcp ]; then
NTPD_OPTS="$NTPD_OPTS -c /run/ntp.conf.dhcp"
fi
fi

So systemd is still restarting the ntp daemon, but at least it's not
giving it a broken config to use any more.

> What errors were you getting in your logs?

I didn't notice any errors in the logs. I was "playing along at home"
with a thread about troubleshooting ntp & the suggestion was to do an
'ntpq -p' .. which I did and then started cursing when I saw just the
one server listed that clearly wasn't working.

Thanks
Lee

Reco

unread,
Feb 9, 2022, 10:10:05 AM2/9/22
to
Hi.

On Wed, Feb 09, 2022 at 09:05:51AM -0500, Lee wrote:
> On 2/8/22, Greg Wooledge <gr...@wooledge.org> wrote:
> > On Tue, Feb 08, 2022 at 02:43:02PM -0500, Lee wrote:
> >> How to tell systemd to leave the ntpd config alone?
> >
> > What makes you think the two are connected in any way?
>
> $ grep "Network Time Service" syslog
> Feb 6 12:06:48 spot systemd[1]: Stopping Network Time Service...
> Feb 6 12:06:48 spot systemd[1]: Stopped Network Time Service.
> Feb 6 12:06:48 spot systemd[1]: Starting Network Time Service...
> Feb 6 12:06:48 spot systemd[1]: Started Network Time Service.
> Feb 6 12:09:25 spot systemd[1]: Stopping Network Time Service...
> Feb 6 12:09:25 spot systemd[1]: Stopped Network Time Service.
> Feb 6 12:09:25 spot systemd[1]: Starting Network Time Service...
> Feb 6 12:09:25 spot systemd[1]: Started Network Time Service.
> Feb 6 12:22:53 spot systemd[1]: Stopping Network Time Service...
> Feb 6 12:22:53 spot systemd[1]: Stopped Network Time Service.
> Feb 6 12:22:53 spot systemd[1]: Starting Network Time Service...
> Feb 6 12:22:53 spot systemd[1]: Started Network Time Service.
> ... etc
>
> every time I connect or disconnect from a wifi network.

Or it could mean that dhclient hook merely asks systemd to restart ntpd
service. See /etc/dhcp/dhclient-exit-hooks.d/ntp.


> My first thought was telling the machine to ignore the NTP server
> address handed out via DHCP. Maybe there's a way to do that, but I
> couldn't figure out how :(

supercede ntp-servers "..." in dhclient.conf should do it for you.

The option was helpfully provided by dhclient.conf(5).


> >> I tried changing /etc/dhcp/dhclient.conf to request just
> >> request subnet-mask, broadcast-address, routers,
> >> interface-mtu,
> >> rfc3442-classless-static-routes ;
> >>
> >> and systemd still restarted ntpd with only the dhcp supplied ntp
> >> server address ... which is this machine, so all the configured ntp
> >> servers went away :(

And that merely stopped dhclient from asking DHCP server to provide
"ntp-server" option. What it cannot stop is DHCP server providing
"ntp-server" option anyway.

ISC dhclient simply lacks the option to ignore certain options in DHCP
reply. It can supercede them though.


> >> I then tried telling network manager to just get an ip address &
> >> subnet mask from dhcp. And still systemd fucked up the ntpd config
> >>
> >> What finally worked was editing /usr/lib/ntp/ntp-systemd-wrapper to
> >> remove ' NTPD_OPTS="$NTPD_OPTS -u $UGID" '
> >
> > Huh? You're saying that removing the "-u $UGID" option made it "work"?
> > And that it "didn't work" with -u being passed?

Changing the contents of /etc/dhcp/dhclient-exit-hooks.d/ntp would make
it more friendly for the purpose of the future updates.

Reco

Charles Curley

unread,
Feb 9, 2022, 10:10:06 AM2/9/22
to
On Wed, 9 Feb 2022 09:05:51 -0500
Lee <ler...@gmail.com> wrote:

> 2nd thought was telling the DHCP server to not hand out an NTP server
> address to this one machine, but that's another damnifi know how to.

If you are running isc-dhcp-server, look for "option ntp-servers" in
/etc/dhcp/dhcpd.conf.

Another way to do it is to have the time server get its ip address from
/etc/network/interfaces, so it ignores DHCP.

--
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/

Greg Wooledge

unread,
Feb 9, 2022, 10:50:05 AM2/9/22
to
On Wed, Feb 09, 2022 at 05:44:25PM +0300, Reco wrote:
> Hi.
>
> On Wed, Feb 09, 2022 at 09:05:51AM -0500, Lee wrote:
> > On 2/8/22, Greg Wooledge <gr...@wooledge.org> wrote:
> > > On Tue, Feb 08, 2022 at 02:43:02PM -0500, Lee wrote:
> > >> How to tell systemd to leave the ntpd config alone?
> > >
> > > What makes you think the two are connected in any way?
> >
> > $ grep "Network Time Service" syslog
> > Feb 6 12:06:48 spot systemd[1]: Stopping Network Time Service...
> > Feb 6 12:06:48 spot systemd[1]: Stopped Network Time Service.
> > Feb 6 12:06:48 spot systemd[1]: Starting Network Time Service...
> > Feb 6 12:06:48 spot systemd[1]: Started Network Time Service.
> > Feb 6 12:09:25 spot systemd[1]: Stopping Network Time Service...
> > Feb 6 12:09:25 spot systemd[1]: Stopped Network Time Service.
> > Feb 6 12:09:25 spot systemd[1]: Starting Network Time Service...
> > Feb 6 12:09:25 spot systemd[1]: Started Network Time Service.
> > Feb 6 12:22:53 spot systemd[1]: Stopping Network Time Service...
> > Feb 6 12:22:53 spot systemd[1]: Stopped Network Time Service.
> > Feb 6 12:22:53 spot systemd[1]: Starting Network Time Service...
> > Feb 6 12:22:53 spot systemd[1]: Started Network Time Service.
> > ... etc
> >
> > every time I connect or disconnect from a wifi network.
>
> Or it could mean that dhclient hook merely asks systemd to restart ntpd
> service. See /etc/dhcp/dhclient-exit-hooks.d/ntp.

What a disaster. The number of moving parts here is just staggering.

OK, now we know that the real culprit is in fact Debian's concept of
how a DHCP client should behave. Let's try to track down all of the
pieces and figure out what the *best* answers are.

The first piece, we now know, is the /etc/dhcp/dhclient-exit-hooks.d/ntp
script. We can see that this creates a temporary file, writes a new NTP
configuration into it, moves it to /run/ntp.conf.dhcp and then asks the
system to restart ntpd.

The second piece is the /etc/init.d/ntp script (SURPRISE! sysv-rc still
lives!). Here we see this bit of conspiracy:

if [ -e /run/ntp.conf.dhcp ]; then
NTPD_OPTS="$NTPD_OPTS -c /run/ntp.conf.dhcp"
fi

If /run/ntp.conf.dhcp exists, then it's used preferentially over the
system's *real* ntp.conf file. So, the DHCP hook generates this fake
config file, and then the sysv-rc script sees it and decides to use it.

AND SOMEONE THOUGHT THIS KLUDGE WAS A GOOD IDEA!!

So, this gives us at least two points of attack. You could edit the DHCP
hook script, and stop it from creating the fake config file. Or, you
could edit the sysv-rc script and stop it from *respecting* the fake
config file.

The question, I suppose, is which one of these is less likely to be
overwritten if the ntp package is updated. But they are both listed in
/var/lib/dpkg/info/ntp.conffiles so they should both survive a package
update. (You'll be asked whether to keep the existing file, etc.)

Lee

unread,
Feb 9, 2022, 11:10:06 AM2/9/22
to
On 2/9/22, Reco <recov...@enotuniq.net> wrote:
> Hi.
>
> On Wed, Feb 09, 2022 at 09:05:51AM -0500, Lee wrote:
>> On 2/8/22, Greg Wooledge <gr...@wooledge.org> wrote:
>> > On Tue, Feb 08, 2022 at 02:43:02PM -0500, Lee wrote:
>> >> How to tell systemd to leave the ntpd config alone?
>> >
>> > What makes you think the two are connected in any way?
>>
>> $ grep "Network Time Service" syslog
>> Feb 6 12:06:48 spot systemd[1]: Stopping Network Time Service...
>> Feb 6 12:06:48 spot systemd[1]: Stopped Network Time Service.
>> Feb 6 12:06:48 spot systemd[1]: Starting Network Time Service...
>> Feb 6 12:06:48 spot systemd[1]: Started Network Time Service.
>> Feb 6 12:09:25 spot systemd[1]: Stopping Network Time Service...
>> Feb 6 12:09:25 spot systemd[1]: Stopped Network Time Service.
>> Feb 6 12:09:25 spot systemd[1]: Starting Network Time Service...
>> Feb 6 12:09:25 spot systemd[1]: Started Network Time Service.
>> Feb 6 12:22:53 spot systemd[1]: Stopping Network Time Service...
>> Feb 6 12:22:53 spot systemd[1]: Stopped Network Time Service.
>> Feb 6 12:22:53 spot systemd[1]: Starting Network Time Service...
>> Feb 6 12:22:53 spot systemd[1]: Started Network Time Service.
>> ... etc
>>
>> every time I connect or disconnect from a wifi network.
>
> Or it could mean that dhclient hook merely asks systemd to restart ntpd
> service. See /etc/dhcp/dhclient-exit-hooks.d/ntp.

That's certainly better :)

mkdir /etc/dhcp/dhclient-exit-hooks.d.NOT
mv /etc/dhcp/dhclient-exit-hooks.d/ntp /etc/dhcp/dhclient-exit-hooks.d.NOT/ntp

disconnect / connect wifi and 'ntpq -p' still shows most servers with
a reach value of 377
(ie. ntpd isn't being restarted :)

>> My first thought was telling the machine to ignore the NTP server
>> address handed out via DHCP. Maybe there's a way to do that, but I
>> couldn't figure out how :(
>
> supercede ntp-servers "..." in dhclient.conf should do it for you.
>
> The option was helpfully provided by dhclient.conf(5).

I tried not giving it a value - ie
supersede ntp-servers ;

didn't work. Apparently one _has_ to give it a value.

>> >> I tried changing /etc/dhcp/dhclient.conf to request just
>> >> request subnet-mask, broadcast-address, routers,
>> >> interface-mtu,
>> >> rfc3442-classless-static-routes ;
>> >>
>> >> and systemd still restarted ntpd with only the dhcp supplied ntp
>> >> server address ... which is this machine, so all the configured ntp
>> >> servers went away :(
>
> And that merely stopped dhclient from asking DHCP server to provide
> "ntp-server" option. What it cannot stop is DHCP server providing
> "ntp-server" option anyway.
>
> ISC dhclient simply lacks the option to ignore certain options in DHCP
> reply. It can supercede them though.

The way I read the man page, supercede requires a value. I can't just
say ignore what the DHCP server gives me, I have to say use <this>
instead of what the DHCP server gives me ... and there is no <this>
value, it's several pool & server lines that I don't want replaced.

>> >> I then tried telling network manager to just get an ip address &
>> >> subnet mask from dhcp. And still systemd fucked up the ntpd config
>> >>
>> >> What finally worked was editing /usr/lib/ntp/ntp-systemd-wrapper to
>> >> remove ' NTPD_OPTS="$NTPD_OPTS -u $UGID" '
>> >
>> > Huh? You're saying that removing the "-u $UGID" option made it "work"?
>> > And that it "didn't work" with -u being passed?
>
> Changing the contents of /etc/dhcp/dhclient-exit-hooks.d/ntp would make
> it more friendly for the purpose of the future updates.

Changing it or moving it to another, clearly not supposed to be
invoked, directory?

Either way - I agree, changing /etc/dhcp/dhclient-exit-hooks.d/ntp is
the better method.

Thanks
Lee

Lee

unread,
Feb 9, 2022, 11:20:07 AM2/9/22
to
exactly :(

Any idea what the chances are of getting an enhancement request for
the dhcp client to add an
ignore option;
that says not use the option given by the dhcp server?

> So, this gives us at least two points of attack. You could edit the DHCP
> hook script, and stop it from creating the fake config file. Or, you
> could edit the sysv-rc script and stop it from *respecting* the fake
> config file.
>
> The question, I suppose, is which one of these is less likely to be
> overwritten if the ntp package is updated. But they are both listed in
> /var/lib/dpkg/info/ntp.conffiles so they should both survive a package
> update. (You'll be asked whether to keep the existing file, etc.)

*sigh* naturally I picked the "move it somewhere else" option that
won't prevent an upgrade from re-creating the file.

Thanks
Lee

Reco

unread,
Feb 9, 2022, 11:50:05 AM2/9/22
to
On Wed, Feb 09, 2022 at 11:00:14AM -0500, Lee wrote:
> Any idea what the chances are of getting an enhancement request for
> the dhcp client to add an
> ignore option;
> that says not use the option given by the dhcp server?

apt install dhcpcd5

It can do this, it is called "nooption ntp_servers"

Reco

Reco

unread,
Feb 9, 2022, 11:50:06 AM2/9/22
to
On Wed, Feb 09, 2022 at 10:49:34AM -0500, Lee wrote:
> >> My first thought was telling the machine to ignore the NTP server
> >> address handed out via DHCP. Maybe there's a way to do that, but I
> >> couldn't figure out how :(
> >
> > supercede ntp-servers "..." in dhclient.conf should do it for you.
> >
> > The option was helpfully provided by dhclient.conf(5).
>
> I tried not giving it a value - ie
> supersede ntp-servers ;
>
> didn't work. Apparently one _has_ to give it a value.

Yup. But you know which NTP servers you want this host to use, do you?


> >> >> I tried changing /etc/dhcp/dhclient.conf to request just
> >> >> request subnet-mask, broadcast-address, routers,
> >> >> interface-mtu,
> >> >> rfc3442-classless-static-routes ;
> >> >>
> >> >> and systemd still restarted ntpd with only the dhcp supplied ntp
> >> >> server address ... which is this machine, so all the configured ntp
> >> >> servers went away :(
> >
> > And that merely stopped dhclient from asking DHCP server to provide
> > "ntp-server" option. What it cannot stop is DHCP server providing
> > "ntp-server" option anyway.
> >
> > ISC dhclient simply lacks the option to ignore certain options in DHCP
> > reply. It can supercede them though.
>
> The way I read the man page, supercede requires a value.

One can say that too.


> I can't just say ignore what the DHCP server gives me, I have to say
> use <this> instead of what the DHCP server gives me ... and there is
> no <this> value, it's several pool & server lines that I don't want
> replaced.

Changing DHCP client is an option too.


> >> >> I then tried telling network manager to just get an ip address &
> >> >> subnet mask from dhcp. And still systemd fucked up the ntpd config
> >> >>
> >> >> What finally worked was editing /usr/lib/ntp/ntp-systemd-wrapper to
> >> >> remove ' NTPD_OPTS="$NTPD_OPTS -u $UGID" '
> >> >
> >> > Huh? You're saying that removing the "-u $UGID" option made it "work"?
> >> > And that it "didn't work" with -u being passed?
> >
> > Changing the contents of /etc/dhcp/dhclient-exit-hooks.d/ntp would make
> > it more friendly for the purpose of the future updates.
>
> Changing it or moving it to another, clearly not supposed to be
> invoked, directory?

Removing this hook should be sufficient. Even better - add "exit 0" to
the beginning.

Reco

Greg Wooledge

unread,
Feb 9, 2022, 12:10:06 PM2/9/22
to
On Wed, Feb 09, 2022 at 11:00:14AM -0500, Lee wrote:
> *sigh* naturally I picked the "move it somewhere else" option that
> won't prevent an upgrade from re-creating the file.

Missing config files will not be reinstalled, unless you call dpkg
with the "--force-confmiss" option. You should be fine.

Tim Woodall

unread,
Feb 12, 2022, 1:00:05 AM2/12/22
to
On Wed, 9 Feb 2022, Lee wrote:

> Any idea what the chances are of getting an enhancement request for
> the dhcp client to add an
> ignore option;
> that says not use the option given by the dhcp server?
>
isc-dhcp-client? zero.

https://www.isc.org/dhcp/

The client and relay portions of ISC DHCP are no longer maintained.

It's on my todo list, along with ntp, to move to something else...

Lee

unread,
Feb 16, 2022, 12:40:05 PM2/16/22
to
On 2/12/22, Tim Woodall <debia...@woodall.me.uk> wrote:
> On Wed, 9 Feb 2022, Lee wrote:
>
>> Any idea what the chances are of getting an enhancement request for
>> the dhcp client to add an
>> ignore option;
>> that says not use the option given by the dhcp server?
>>
> isc-dhcp-client? zero.
>
> https://www.isc.org/dhcp/
>
> The client and relay portions of ISC DHCP are no longer maintained.

*sigh*
https://ftp.isc.org/isc/dhcp/4.4.3b1/dhcp-4.4.3b1-RELNOTES
NOTE: The client and relay components are now End-Of-Life.
4.4.3 is the final release for those components.

How does one figure out what the replacement dhcp client software is
going to be?

> It's on my todo list, along with ntp, to move to something else...

I've seen references to chrony and ntpsec as replacements.

Regards,
Lee

Tim Woodall

unread,
Feb 17, 2022, 10:40:06 AM2/17/22
to
On Wed, 16 Feb 2022, Lee wrote:

> On 2/12/22, Tim Woodall <debia...@woodall.me.uk> wrote:
>> On Wed, 9 Feb 2022, Lee wrote:
>>
>>> Any idea what the chances are of getting an enhancement request for
>>> the dhcp client to add an
>>> ignore option;
>>> that says not use the option given by the dhcp server?
>>>
>> isc-dhcp-client? zero.
>>
>> https://www.isc.org/dhcp/
>>
>> The client and relay portions of ISC DHCP are no longer maintained.
>
> *sigh*
> https://ftp.isc.org/isc/dhcp/4.4.3b1/dhcp-4.4.3b1-RELNOTES
> NOTE: The client and relay components are now End-Of-Life.
> 4.4.3 is the final release for those components.
>
> How does one figure out what the replacement dhcp client software is
> going to be?
>
I'll probably try dhcpcd5. I have vague memories of using it before,
don't recall why I changed (probably dhcpcd in those days)

>> It's on my todo list, along with ntp, to move to something else...
>
> I've seen references to chrony and ntpsec as replacements.
>

ntpsec is supposed to be an almost drop in replacement.

Lee

unread,
Feb 19, 2022, 9:30:06 AM2/19/22
to
On 2/17/22, Tim Woodall <debia...@woodall.me.uk> wrote:
>>> It's on my todo list, along with ntp, to move to something else...
>>
>> I've seen references to chrony and ntpsec as replacements.
>
> ntpsec is supposed to be an almost drop in replacement.

If I'm interpreting the popcon pages right,
ntpsec 228 users
chrony 4686 users
ntp 47485 users
I'd much rather let someone else debug ntpsec. ntp has been around
for ages, so while it might be hard to change I'm guessing most of the
bugs have been fixed by now.

If you haven't seen it, the "The future of src:ntp" thread on
debian-devel is worth a read.
tl-dr: https://www.coreinfrastructure.org/blogs/securing-network-time/

If I wanted to replace whatever timekeeping software that comes with
systemd and _didn't_ want ntp, I'd pick chrony.

Regards,
Lee
0 new messages