News for hackers. Stuff that matters.
Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by IgorPartola on Saturday July 17, 2021 @06:12PM (#27869235)
What I also don’t get: why the hell would do I care which NTP implementation is used in most cases. What I do care about is that it’s running and working. systemd has a good init system and a decent set of other services. Could things be improved? Sure. But honestly as long as when I boot my Debian-derived distro it works as expected why am I going yo go digging into how it works? What can I possibly gain by switching which DHCP client or which NTP daemon I’m using?
Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by throw0101a on Saturday July 17, 2021 @06:25PM (#27869315)
> What I also don’t get: why the hell would do I care which NTP implementation is used in most cases.

Because some implementations have time jump while others have it slew it slowly.

On boot-up a jump may be fine to get with ± some number of milliseconds, but once the system is running, there are situations where jumps could be a problem (especially in the negative direction, where a moment is "repeated").

> But honestly as long as when I boot my Debian-derived distro it works as expected why am I going yo go digging into how it works? What can I possibly gain by switching which DHCP client or which NTP daemon I’m using?

Because as a sysadmin it is your job to understand how a system works. There should be very little "magic" happening. Sure there are many times where things Just Working™ is fine (it's why I run a Mac at home), but many others where you should understand why things are working the way they are.

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by IgorPartola on Saturday July 17, 2021 @10:40PM (#27870429)
I am a sysadmin for some systems. I am merely a user for others. Servers that run my projects? Sure I will dig into what’s up. My Raspberry Pi running Raspbian so I can run my 3D printer off it? I’m a user.
Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by Denvercoder9 on Saturday July 17, 2021 @06:34PM (#27869345)
> Because as a sysadmin it is your job to understand how a system works.

No, as a sysadmin your job is to deliver a working system. To do that it usually helps to understand how the system works, but it's not a necessity. As long as something keeps working, and you're equipped to go digging if and when it's necessary, it's fine to not understand or know how something works.

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by totony on Saturday July 17, 2021 @07:39PM (#27869675)
>As long as something keeps working, and you're equipped to go digging if and when it's necessary, it's fine to not understand or know how something works

How do you know it's working if you don't understand it? What's preventing some admin socket to be activated, is the firewall good, etc

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by someguydave on Saturday July 17, 2021 @08:44PM (#27869937)
you can ride and breed horses without understanding horse physiology or DNA. when you need to fix a broken or lame horse or breed a better horse, knowing how it works helps alot

presumably most sys admins are more akin to vets than riders

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by donmcronald on Saturday July 17, 2021 @09:39PM (#27870170)
> But honestly as long as when I boot my Debian-derived distro it works as expected why am I going yo go digging into how it works?

My (least) favorite SystemD gotcha I discovered recently is the way it's taken over 'fstab' in some distros. I think Debian is one of them. When you edit 'fstab', you need to run 'systemctl daemon-reload'. Fine. Whatever. I don't have a huge problem with that.

However, when you try to boot after a disk has been removed from the system, it won't. Instead it drops to a recovery console, BUT if you use a distro without a 'root' password, it can't drop into the recovery console and you're screwed.

The default setup on a lot of Linux distros won't boot if you remove a non-system disk. I like SystemD more than the old init system(s), but there are some really, really dumb decisions that have been made along the way.

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by jasonjayr on Saturday July 17, 2021 @09:54PM (#27870236)
Yep. Hit that one too.

Learned the hard way the need for the 'nofail' flag in 'fs_mntops' field, which was undocumented in the man page in the early versions ...

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by Denvercoder9 on Sunday July 18, 2021 @06:13AM (#27871848)
> Instead it drops to a recovery console, BUT if you use a distro without a 'root' password, it can't drop into the recovery console and you're screwed.

That's indeed an unfortunate situation. systemd allows you to set the SYSTEMD_SULOGIN_FORCE environment variable for the rescue.service to override this behaviour and always give you a rootshell. It's an open bug for the Debian installer to set that variable by default if installing without a root password (#952450).

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by gigatexal on Sunday July 18, 2021 @02:39AM (#27871145)
Ok that’s a bit much. Why is SystemD encroaching on the fstab??
Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by Denvercoder9 on Sunday July 18, 2021 @06:18AM (#27871865)
It's not encroaching on fstab, it's using it as input during boot, because mounting is intimately coupled with service ordering. Think about services that reside on a network filesystem: the network has to be up to mount the filesystem, but the network in turn can require arbitrary services to run, which can require other local filesystems to be mounted. You can't get configurations like these to work without coupling mounting and service ordering.

It's fundamentally not that different from sysvinit, with its various init scripts that mounted filesystems according to the fstab.

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by jcelerier on Sunday July 18, 2021 @02:56AM (#27871192)
Because systemd services can depend on mount points or cause mountpoints to come up dynamically, in a way that pure fstab does not support, e.g. for containers. So (as far as I understand) fstab is now simply an input to the actual mount system.
Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by yrro on Sunday July 18, 2021 @07:23AM (#27872100)
If you want your system to boot if a filesystem can't be mounted, use the longstanding nofail option on the noint point.
Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by cesarb on Saturday July 17, 2021 @06:32PM (#27869331)
> What I also don’t get: why the hell would do I care which NTP implementation is used in most cases. What I do care about is that it’s running and working.

You should care whether it's SNTP (which only slews and/or steps the clock periodically) or full NTP (which also adjusts the clock frequency, so once it's synchronized, no further slew and/or step is needed). Full NTP is better.

Looking quickly at the manual pages for systemd-timesyncd and systemd-timedated, I can see that systemd-timesyncd is just SNTP, so a full NTP implementation like chrony or ntpsec should be preferred. From what I can see, if you have chrony installed and configured correctly, systemd's "timedatectl set-ntp true" (enable NTP) will prefer to enable chrony instead of systemd-timesyncd (it goes through systemd-timedated which looks at /usr/lib/systemd/ntp-units.d/, where chrony is usually listed first).

(Also, there's some difference between chrony and ntpsec; AFAIK, chrony is much better when you have an intermittent network connection.)

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by yosamino on Saturday July 17, 2021 @08:05PM (#27869773)
> What can I possibly gain by switching which DHCP client

Yesterday I switched to systemd-networkd on debian to gain the feature of having the hostname be set via DHCP and not have to write a script myself. In the process I pulled in a javascript dependency via policykit, which is giving me pause and I am re-evaluating if my approach is correct here.

But for this feature I had to switch DHCP server and client. TBF it's not something that comes up all the time, but it sure is something I thought was more commonly implemented.

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by xyzzy_plugh on Saturday July 17, 2021 @09:20PM (#27870094)
> In the process I pulled in a javascript dependency via policykit, which is giving me pause and I am re-evaluating if my approach is correct here.

To be fair, policykit is great. It solves a real problem (namely is this user allowed to peform this action, which traditional POSIX permissions do not solve in a portably) in a very sane way that is totally optional to opt in to.

Should polkit use a different, turing complete language than JavaScript? I don't know, probably, but it's not an awful choice. There is definitely more developer literacy for JS than, say, Lua or some other bespoke monstrosity they could've picked instead.

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by chmod775 on Saturday July 17, 2021 @10:54PM (#27870474)
> Lua or some other bespoke monstrosity

Lua is definitely the opposite of 'bespoke monstrosity'. It's pretty much the intersection of tiny interpreter, fast execution, and simple language.

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by xyzzy_plugh on Sunday July 18, 2021 @09:46PM (#27878416)
Apologies if I mistyped this, Lua is not remotely a monstrosity. It's great! But I don't think it would be appropriate here, and I think more developers can grok JS in this day and age.
Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by someperson on Saturday July 17, 2021 @10:23PM (#27870365)
Doesn't POSIX and Linux Standard Base already mandate certain scripting languages to be preinstalled, such as Python?
Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by thristian on Saturday July 17, 2021 @10:54PM (#27870477)
I've heard a rumour that POSIX mandates that Perl be installed, although I haven't been able to substantiate it.

POSIX-described Turing-complete interpreters include at leat the Bourne shell, awk, and sed, none of which you probably want to use for implementing a security policy.

Apparently LSB 5.0 mandates[1] both Perl (5.8) and Python (2.4), but that won't pacify anyone with an axe to grind about applications making Linux-specific assumptions.

[1]: https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Languages...

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by cesarb on Sunday July 18, 2021 @12:31AM (#27870768)
> Apparently LSB 5.0 mandates[1] both Perl (5.8) and Python (2.4)

Wow, that didn't age well. That document actually says Python "2.4.2 or greater" and Perl "5.8.8 or greater", which doesn't help if the installed interpreters are Python 3.10 and Perl 6.c (2018.06), since both are greater than the specified versions but incompatible with them. Even if it had specified the major release (that is, Python 2.x greater than 2.4.2 and Perl 5.x greater than 5.8.8), that wouldn't help once those major releases are no longer maintained.

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by dale_glass on Sunday July 18, 2021 @06:05AM (#27871820)
Perl 6 isn't really a thing anymore.

Python3 requires some code changes, but on the whole is the same language.

Perl 6 was intended to be an upgrade from 5, but over time developed into a completely new language that shared stylistic similarities to Perl 5. Perl 6 can't be compatible with Perl 5 to any large extent because XS isn't a thing anymore, so any modules that had binary parts to them can't be easily ported.

These days Perl 6 got renamed to "Raku", to signify that it's its own, independent language.

The Perl 5 line continues to exist and apparently plans for the next major version to be Perl 7.

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by gnubison on Monday July 19, 2021 @12:03AM (#27879129)
> I've heard a rumour that POSIX mandates that Perl be installed, although I haven't been able to substantiate it.

It’s not: https://shellhaters.org

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by yrro on Sunday July 18, 2021 @07:27AM (#27872118)
The Debian policykit packages have (frustratingly) diverted from upstream here. They do not pull in mozjs, sanding users with the older and far less flexible rules files.
Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by rsmarples on Sunday July 18, 2021 @03:16PM (#27875689)
If you don't like it, try dhcpcd I which can set the hostname via DHCP by default.

On Linux there are no hard dependencies although your distro may enforce a udev dependency.

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by floatboth on Saturday July 17, 2021 @08:47PM (#27869952)
I care about which NTP implementation is used because OpenNTPD supports getting time constraints from TLS servers. Which.. no, I absolutely do not actually worry about NTP servers intentionally feeding my laptop the wrong time, but this is just a feature that sounds too cool to ignore. How can I not go out of my way to have that going on??

Sometimes I kinda envy people who don't have this shiny-tech-obsession and are satisfied with things just working :)

Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by IgorPartola on Saturday July 17, 2021 @10:48PM (#27870449)
Oh don’t get me wrong I customize things. I have just moved on from customizing parts of a Linux distro. At some point I want to customize things that make more of an impact on the real world.
Re:dhcpleased(8) and resolvd(8) enabled in base, replacing d... by djrogers on Saturday July 17, 2021 @11:00PM (#27870499)
> why the hell would do I care which NTP implementation is used

Allow me to introduce you to BSD users. (I don’t get it either).