Re: [systemd-devel] systemd-tmpfiles-setup.service: ... Unknown user '1019'

2019-07-03 Thread Lennart Poettering
On Mi, 03.07.19 09:07, Ulrich Windl (ulrich.wi...@rz.uni-regensburg.de) wrote:

> Hi!
>
> I'm having a problem created by systemd: A temporary directory is to
> be created that is owned by a user found in LDAP.  However as all
> temporary directories are created way before networking is
> available, I cannot user the user name, nor can systemd delay
> creating that directory after networking/LDAP is available.  So I
> tried specifying the numeric UID/GID instead, but contrary to the
> manual page, it does not work:

This is explicitly not supported. System users need to be resolvable
at any time. This is explicitly documented for systemd:

https://systemd.io/UIDS-GIDS.html#notes-on-resolvability-of-user-and-group-names

> systemd-tmpfiles[19305]: [/usr/lib/tmpfiles.d/nrpe.conf:1] Unknown user 
> '1019'.
>
> The only line in file /usr/lib/tmpfiles.d/nrpe.conf is:
> d /run/nrpe 0755 1019 nagios
>
> From the manual page:
>UID, GID
>The user and group to use for this file or directory. This may either 
> be a numeric user/group ID or a
>user or group name. If omitted or when set to "-", the default 0 
> (root) is used. For z and Z lines, when
> ...

Update to a newer systemd version, or ask your distro to backport
commit fafff8f1ffdf24517921d7779c2a9eb89766df30 (and its dependencies).

Before that commit the code insisted that users specified by numeric
UID had to exist, after that commit this is no longer required.

> Any clever ideas?  My guess is to split creating all the temporary
> files at early boott time into multiple phases so that name service
> can be used for use rresolution. If the service needs the name
> resolution, the temporary directory for the service can be delayes
> just before the service will be started...

Just add system users to /etc/passwd, otherwise you'll be in constant
pain, and you have to deal with the fall-out yourself.

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] systemd-tmpfiles-setup.service: ... Unknown user '1019'

2019-07-03 Thread Ulrich Windl
Hi!

I'm having a problem created by systemd: A temporary directory is to be created 
that is owned by a user found in LDAP.
However as all temporary directories are created way before networking is 
available, I cannot user the user name, nor can systemd delay creating that 
directory after networking/LDAP is available.
So I tried specifying the numeric UID/GID instead, but contrary to the manual 
page, it does not work:

systemd-tmpfiles[19305]: [/usr/lib/tmpfiles.d/nrpe.conf:1] Unknown user '1019'.

The only line in file /usr/lib/tmpfiles.d/nrpe.conf is:
d /run/nrpe 0755 1019 nagios

From the manual page:
   UID, GID
   The user and group to use for this file or directory. This may either be 
a numeric user/group ID or a
   user or group name. If omitted or when set to "-", the default 0 (root) 
is used. For z and Z lines, when
...

Any clever ideas?
My guess is to split creating all the temporary files at early boott time into 
multiple phases so that name service can be used for use rresolution. If the 
service needs the name resolution, the temporary directory for the service can 
be delayes just before the service will be started...

Regards,
Ulrich


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel