Re: NIS and systemd-udevd

2023-07-26 Thread Greg Wooledge
On Wed, Jul 26, 2023 at 10:31:09AM +0200, Christoph Pleger wrote:
> I found out that, though this works for users listed in /etc/passwd, it
> does not for users who have a remote NIS account.
> 
> That problem already occurred a longer time ago, but in the meanwhile,
> I had solved (by following suggestions from the internet) it by
> installing unscd and creating a file /etc/systemd/system/systemd-
> udevd.service.d/override.conf with the following content:
> 
> [Service]
> IPAddressAllow=localhost
> 
> But now, the problem occurs again: After booting the computer,
> I have to restart systemd-udevd to make 99-local.rules work as desired.
> 
> Does anyone have an idea how to solve the problem?

First thing I'll note is that this reminds me quite a bit of this
change which occurred in buster:

The security settings for some components of systemd have
been tightened. People using nis with systemd may encounter
bug 878625 which breaks a variety of things related to login
sessions. Workarounds include installing the nscd package,
or reconfiguring systemd-logind.service to allow it to use
the network.



But I suppose you're past that, and you're asking why you have to
restart a service after booting.  I don't have a direct answer for
that, but I'm wondering whether installing nscd would help.



NIS and systemd-udevd

2023-07-26 Thread Christoph Pleger
Hello,

I have the following udev rule in /lib/udev/rules.d/99-local.rules:

ACTION=="add", SUBSYSTEM=="block", ATTRS{removable}=="1",
PROGRAM="/lib/udev/foreground-user", RESULT!="root", MODE="0600",
OWNER="$result"

This is to ensure that, if someone is logged in on the graphical
console at the time when a USB is inserted, this person becomes the
owner of the devive file belonging to the stick, /dev/sd[a-z].

I found out that, though this works for users listed in /etc/passwd, it
does not for users who have a remote NIS account.

That problem already occurred a longer time ago, but in the meanwhile,
I had solved (by following suggestions from the internet) it by
installing unscd and creating a file /etc/systemd/system/systemd-
udevd.service.d/override.conf with the following content:

[Service]
IPAddressAllow=localhost

But now, the problem occurs again: After booting the computer,
I have to restart systemd-udevd to make 99-local.rules work as desired.

Does anyone have an idea how to solve the problem?

Regards
   Christoph


signature.asc
Description: This is a digitally signed message part