Skip to content

Conversation

@bluca
Copy link
Contributor

@bluca bluca commented Jan 14, 2026

Ubuntu, debian and other distro create the nut user/group pair by default in their packages.

Add a sysusers.d config file and install it. This configuration file will create the configured user/group pair on first boot/factory reset/package installation, without requiring manual scripts or actions. This is very important for image-based OSes, but it is useful in other cases too, to allow using declarative configuration instead of scripts.

https://www.freedesktop.org/software/systemd/man/latest/sysusers.d.html

This is especially useful in combination with the existing tmpfiles.d config that is already installed, and makes use of the configured user/group. With the sysusers.d addition, it works out of the box without manual scripting.

Ubuntu, debian and other distro create the nut user/group
pair by default in their packages.

Add a sysusers.d config file and install it. This configuration
file will create the configured user/group pair on first boot/factory
reset/package installation, without requiring manual scripts or actions.
This is very important for image-based OSes, but it is useful in other
cases too, to allow using declarative configuration instead of scripts.

https://www.freedesktop.org/software/systemd/man/latest/sysusers.d.html

This is especially useful in combination with the existing tmpfiles.d
config that is already installed, and makes use of the configured
user/group. With the sysusers.d addition, it works out of the box
without manual scripting.

Signed-off-by: Luca Boccassi <luca.boccassi@gmail.com>
@AppVeyorBot
Copy link

Build nut 2.8.4.3984-master failed (commit 7246d11290 by @bluca)

@AppVeyorBot
Copy link

@jimklimov jimklimov added enhancement packaging systemd Linux Some issues are specific to Linux as a platform labels Jan 14, 2026
@jimklimov jimklimov added this to the 2.8.5 milestone Jan 14, 2026
@AppVeyorBot
Copy link

@jimklimov jimklimov merged commit 71e88b4 into networkupstools:master Jan 16, 2026
3 of 4 checks passed
@bluca bluca deleted the sysusers branch January 16, 2026 12:37
@jimklimov
Copy link
Member

Great thanks for your contribution!

jimklimov added a commit that referenced this pull request Jan 16, 2026
…-sysusers.conf [#3262]

Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
@jimklimov
Copy link
Member

Oddly, OBS did not pick up from the PR some recipe discrepancies due to the new delivered file. Only complained once this got to master :\

@jimklimov
Copy link
Member

@bluca : can this be seen as a step towards #2836 that we happened to discuss last FOSDEM with you and Lennart?

@bluca
Copy link
Contributor Author

bluca commented Jan 20, 2026

Yeah it's part of that whole workflow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Linux Some issues are specific to Linux as a platform packaging systemd

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants