summaryrefslogtreecommitdiff
path: root/sysusers.d/systemd.conf
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-06-12 22:54:02 +0200
committerLennart Poettering <lennart@poettering.net>2014-06-12 23:07:33 +0200
commit1b99214789101976d6bbf75c351279584b071998 (patch)
tree68701d4f1a808f600009c9ec8bb998d244882673 /sysusers.d/systemd.conf
parent0138a2dcc50d261ea3512b0eaca2c6e9d4a807f0 (diff)
sysusers: add minimal tool to reconstruct /etc/passwd and /etc/group from static files
systemd-sysusers is a tool to reconstruct /etc/passwd and /etc/group from static definition files that take a lot of inspiration from tmpfiles snippets. These snippets should carry information about system users only. To make sure it is not misused for normal users these snippets only allow configuring UID and gecos field for each user, but do not allow configuration of the home directory or shell, which is necessary for real login users. The purpose of this tool is to enable state-less systems that can populate /etc with the minimal files necessary, solely from static data in /usr. systemd-sysuser is additive only, and will never override existing users. This tool will create these files directly, and not via some user database abtsraction layer. This is appropriate as this tool is supposed to run really early at boot, and is only useful for creating system users, and system users cannot be stored in remote databases anyway. The tool is also useful to be invoked from RPM scriptlets, instead of useradd. This allows moving from imperative user descriptions in RPM to declarative descriptions. The UID/GID for a user/group to be created can either be chosen dynamic, or fixed, or be read from the owner of a file in the file system, in order to support reconstructing the correct IDs for files that shall be owned by them. This also adds a minimal user definition file, that should be sufficient for most basic systems. Distributions are expected to patch these files and augment the contents, for example with fixed UIDs for the users where that's necessary.
Diffstat (limited to 'sysusers.d/systemd.conf')
-rw-r--r--sysusers.d/systemd.conf44
1 files changed, 44 insertions, 0 deletions
diff --git a/sysusers.d/systemd.conf b/sysusers.d/systemd.conf
new file mode 100644
index 0000000000..c44eaac3da
--- /dev/null
+++ b/sysusers.d/systemd.conf
@@ -0,0 +1,44 @@
+# This file is part of systemd.
+#
+# systemd is free software; you can redistribute it and/or modify it
+# under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or
+# (at your option) any later version.
+
+# The superuser
+u root 0 "Super User"
+
+# The nobody use for NFS file systems
+u nobody 65534 "Nobody"
+
+# Administrator group: can *see* more than normal users
+g adm - -
+
+# Administrator group: can *do* more than normal users
+g wheel - -
+
+# Access to certain kernel and userspace facilities
+g kmem - -
+g lock - -
+g tty 5 -
+g utmp - -
+
+# Hardware access groups
+g audio - -
+g cdrom - -
+g dialout - -
+g disk - -
+g lp - -
+g tape - -
+g video - -
+
+# Default group for normal users
+g users - -
+
+# Users and groups for specific systemd subsystems
+g systemd-journal - -
+u systemd-journal-gateway - "systemd Journal Gateway"
+u systemd-bus-proxy - "systemd Bus Proxy"
+u systemd-network - "systemd Network Management"
+u systemd-resolve - "systemd Resolver"
+u systemd-timesync - "systemd Time Synchronization"