Re: Success of udev rule depends on if user has local or NIS account

2020-01-10 Thread Christoph Pleger

Hi,
On 2020-01-09 18:23, Greg Wooledge wrote:

On Thu, Jan 09, 2020 at 05:56:53PM +0100, Christoph Pleger wrote:
Does anybody know what happened in newer kernels that makes 
OWNER="$result"

fail for NIS accounts?


At a guess, it's bug #878625 again.

Does it start working again if you install nscd, or one of its
alternatives?  Or if you override the IPAddressDeny=any in the
systemd-udevd.service unit?


Many thanks, overriding IPAddressDeny is the solution for my problem!

Regards
  Christoph



Re: Success of udev rule depends on if user has local or NIS account

2020-01-09 Thread Greg Wooledge
On Thu, Jan 09, 2020 at 05:56:53PM +0100, Christoph Pleger wrote:
> Does anybody know what happened in newer kernels that makes OWNER="$result"
> fail for NIS accounts?

At a guess, it's bug #878625 again.

Does it start working again if you install nscd, or one of its
alternatives?  Or if you override the IPAddressDeny=any in the
systemd-udevd.service unit?



Success of udev rule depends on if user has local or NIS account

2020-01-09 Thread Christoph Pleger

Hello,

I wrote the following udev rule:

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


The goal of this rule is to give a user who attaches a USB storage 
device while being logged on in the graphical environment exclusive 
access rights for the corresponding device nodes /dev/sd[a-z]* .


That was working as desired for some time, but now I discovered that is 
does not work correctly any more on some machines, on Debian 10 as well 
as in Ubuntu 18.04. Searching for the reason gave the result that the 
success of the udev rule depends on the kernel version (it worked in 
Ubuntu 18.04 with Kernel 4.15.0-50-generic, but does not work with 
Kernel 4.15.0-74-generic) as well as on if the user has a local or a NIS 
account, that is, it works with local accounts, but not with NIS 
accounts.


Does anybody know what happened in newer kernels that makes 
OWNER="$result" fail for NIS accounts?


Regards
  Christoph