News for hackers. Stuff that matters.
Re:A Word about Systemd by the_real_cher on Tuesday September 17, 2024 @09:12PM (#41574673)
Systemd-resolvd is started by default on my Ubuntu distro v24.
Re:A Word about Systemd by jauntywundrkind on Tuesday September 17, 2024 @11:39PM (#41575533)
Good choice! It's great!

If you really don't want it, it's super easy to disable:

  systemctl disable systemd-resolved
Re:A Word about Systemd by egorfine on Wednesday September 18, 2024 @06:42AM (#41578046)
If only it was that easy. Unfortunately, systemd-resolved is a sticky piece. You have to `apt-get uninstall` it, then `rm /etc/resolv.conf` and replace it with a sane file (`nameserver 1.1.1.1` or whatever).

For previous versions I had to `chattr +x` as well because systemd stuff of course will not let me have my resolver.

Re:A Word about Systemd by vetinari on Wednesday September 18, 2024 @08:39AM (#41578974)
No, disabling, or at works masking is enough.

`nameserver 1.1.1.1` is insane. Hope you don't ever have to use link-specific resolver.

Re:A Word about Systemd by egorfine on Wednesday September 18, 2024 @08:44AM (#41579027)
Indeed. It has to be completely removed from the system and even then there is no guarantee it won't be brought back by some minor update in a couple of days. This is why I had to chattr +x in Ubuntu 22 and older. Not anymore in 24, but we'll see.
Re:A Word about Systemd by vetinari on Wednesday September 18, 2024 @08:45AM (#41579048)
resolv.conf is an internal implementation detail of glibc. You are not supposed to touch it.

Congratulation to breaking your system.

Re:A Word about Systemd by jauntywundrkind on Wednesday September 18, 2024 @12:36PM (#41582107)
Wrong and wrong. It just needs to be stopped. And you can mask it to make sure it never ever ever is started by anyone again. C'mon man, 0 for 0 so far on your grumbles.
Re:A Word about Systemd by egorfine on Wednesday September 18, 2024 @12:38PM (#41582138)
It absolutely wasn't enough to stop and mask it under ubuntu 22.04.
Re:A Word about Systemd by jauntywundrkind on Wednesday September 18, 2024 @01:07PM (#41582540)
Do you know how to use netstat to see who is holding the port open? This seems like a major Problem Exists Between Keyboard And Chair issue. But also Ubuntu can be a special place. But if you stop the service & the port is still open... It's probably not that service, it's something else, and so throwing shade at systemd is again not accurate.

Ah. It might be a systemd-resolved.socket (or similarly named), allow socket activation. Systemd would warn you when you disable the service that it wouldn't be giving up the socket, that it could still be restarted. Because it's a great monorepo that's smart & courteous.

Re:A Word about Systemd by egorfine on Wednesday September 18, 2024 @02:02PM (#41583342)
I think we're confusing two things here. ssh via socket activation is of course a brain damage done solely by Ubuntu. But systemd goes a long way to make sure it hurts, because `ps ax | grep sshd` will definitely show you that /usr/bin/sshd is running. Except it's not it. But maybe that's Ubuntu thing as well, not sure here.
Re:A Word about Systemd by vetinari on Wednesday September 18, 2024 @02:38PM (#41583820)
`sudo netstat -nlp` or `sudo ss -nlp` (without root you won't know pid).

`systemctl status ssh` shows, that it is socket-activated:

    TriggeredBy: ● ssh.socket
[Oh, checking the entire thread for context; never mind]
Re:A Word about Systemd by egorfine on Thursday September 19, 2024 @04:57AM (#41589924)
Hindsight.

You would know to run netstat or lsof if you have expected something like that to happen. It certainly wouldn't ever cross my mind to have sshd socket-activated and systemd actively trying to hide the fact. This change by Canonical was out of the blue, totally unexpected.

Re:A Word about Systemd by the_real_cher on Wednesday September 18, 2024 @10:15AM (#41580003)
Link specific resolvers ONLY are insane.

Why am I forced into nothing but link specific resolvers?

Why cant I have a global default resolver anymore, with link specific as needed?

Re:A Word about Systemd by vetinari on Wednesday September 18, 2024 @10:23AM (#41580093)
Who said link specific resolvers ONLY?

You can have default one. Chances are, if you have only one configured, it will be default. How are you forced? Who did that? How?

Oth, with resolv.conf syntax, link-specific resolvers are impossible. Even the apple-like extension in /etc/resolver, they cannot respond to link doing up and down.

Re:A Word about Systemd by the_real_cher on Wednesday September 18, 2024 @01:16PM (#41582684)
maybe it's a skill issue on my part.

Can you tell me how to have a default global resolver with resolvd and network manager?

Should be pretty straightforward right?

It's a pretty basic task.

I looked all through the Man pages and couldn't find a way to do it with network manager.

Re:A Word about Systemd by vetinari on Wednesday September 18, 2024 @02:48PM (#41583922)
In NetworkManager, you set your DNS servers using `ipv{4,6}.dns`. Similarly, you set `ipv{4,6}.dns-search` with zones that you want to be looked up via DNS over this link. By default, the default DNS is the link with with default route. If you want to designate the default DNS via different link, set up the search for `~.`

Then `resolvectl status` will show you each link, what DNS is configured for it, what domains it will resolve and which one is the default.

Re:A Word about Systemd by johnny22 on Wednesday September 18, 2024 @05:23AM (#41577604)
that is a choice by ubuntu. it is not mandated by systemd itself.