* uuidd user / DynamicUser? @ 2022-07-30 14:50 Chris Hofstaedtler 2022-08-02 10:14 ` Karel Zak 0 siblings, 1 reply; 3+ messages in thread From: Chris Hofstaedtler @ 2022-07-30 14:50 UTC (permalink / raw) To: util-linux Hi, Debian sets up a uuidd user, for uuidd to run as. We also set the home directory for this user to /run/uuidd, which is on a tmpfs, so not ideal. I was wondering what other distributions do for the home directory? Also, is anyone using DynamicUser for uuidd.service? Thanks, Chris ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: uuidd user / DynamicUser? 2022-07-30 14:50 uuidd user / DynamicUser? Chris Hofstaedtler @ 2022-08-02 10:14 ` Karel Zak 2022-08-02 18:27 ` Theodore Ts'o 0 siblings, 1 reply; 3+ messages in thread From: Karel Zak @ 2022-08-02 10:14 UTC (permalink / raw) To: Chris Hofstaedtler; +Cc: util-linux On Sat, Jul 30, 2022 at 04:50:24PM +0200, Chris Hofstaedtler wrote: > Hi, > > Debian sets up a uuidd user, for uuidd to run as. We also set the > home directory for this user to /run/uuidd, which is on a tmpfs, so > not ideal. > > I was wondering what other distributions do for the home directory? RHEL/Fedora spec file: getent group uuidd >/dev/null || groupadd -r uuidd getent passwd uuidd >/dev/null || \ useradd -r -g uuidd -d /var/lib/libuuid -s /sbin/nologin \ -c "UUID generator helper daemon" uuidd So it uses /var/lib/libuuid as a home directory. > Also, is anyone using DynamicUser for uuidd.service? For Fedora and the next RHEL we plan to use https://www.freedesktop.org/software/systemd/man/systemd-sysusers.html It means explicitly define uuidd user in sysusers.d. I'm not sure if our users will be happy with DynamicUser as uuidd is critical for then and stability with minimal variability is expected in setup and runtime. Karel -- Karel Zak <kzak@redhat.com> http://karelzak.blogspot.com ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: uuidd user / DynamicUser? 2022-08-02 10:14 ` Karel Zak @ 2022-08-02 18:27 ` Theodore Ts'o 0 siblings, 0 replies; 3+ messages in thread From: Theodore Ts'o @ 2022-08-02 18:27 UTC (permalink / raw) To: Karel Zak; +Cc: Chris Hofstaedtler, util-linux On Tue, Aug 02, 2022 at 12:14:23PM +0200, Karel Zak wrote: > On Sat, Jul 30, 2022 at 04:50:24PM +0200, Chris Hofstaedtler wrote: > > > > Debian sets up a uuidd user, for uuidd to run as. We also set the > > home directory for this user to /run/uuidd, which is on a tmpfs, so > > not ideal. > > > > I was wondering what other distributions do for the home directory? > > So it uses /var/lib/libuuid as a home directory. Per RFC 4222, the clock sequence *should* be incremented under various circumstances. Setting to to a random value (which would be required if you are using /run/uuidd) is *allowed*, but I would argue that this is not as good, and not as in keeping with the design spirt of UUID version 1: 4.1.5. Clock Sequence For UUID version 1, the clock sequence is used to help avoid duplicates that could arise when the clock is set backwards in time or if the node ID changes. If the clock is set backwards, or might have been set backwards (e.g., while the system was powered off), and the UUID generator can not be sure that no UUIDs were generated with timestamps larger than the value to which the clock was set, then the clock sequence has to be changed. If the previous value of the clock sequence is known, it can just be incremented; otherwise it should be set to a random or high-quality pseudo-random value. Similarly, if the node ID changes (e.g., because a network card has been moved between machines), setting the clock sequence to a random number minimizes the probability of a duplicate due to slight differences in the clock settings of the machines. If the value of clock sequence associated with the changed node ID were known, then the clock sequence could just be incremented, but that is unlikely. If system is using a read-only root, and doesn't want to maintain a /var partition, which some systemd installations do care about --- but for more traditional distributions, such as RHEL and Debian, my personal recommendation is to not try to use /run/uuidd and using a dynamic user for uuidd. Cheers, - Ted ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-02 18:27 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2022-07-30 14:50 uuidd user / DynamicUser? Chris Hofstaedtler 2022-08-02 10:14 ` Karel Zak 2022-08-02 18:27 ` Theodore Ts'o
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).