1SYSTEMD-SYSUSERS(8) systemd-sysusers SYSTEMD-SYSUSERS(8)
2
3
4
6 systemd-sysusers, systemd-sysusers.service - Allocate system users and
7 groups
8
10 systemd-sysusers [OPTIONS...] [CONFIGFILE...]
11
12 systemd-sysusers.service
13
15 systemd-sysusers creates system users and groups, based on the file
16 format and location specified in sysusers.d(5).
17
18 If invoked with no arguments, it applies all directives from all files
19 found in the directories specified by sysusers.d(5). When invoked with
20 positional arguments, if option --replace=PATH is specified, arguments
21 specified on the command line are used instead of the configuration
22 file PATH. Otherwise, just the configuration specified by the command
23 line arguments is executed. The string "-" may be specified instead of
24 a filename to instruct systemd-sysusers to read the configuration from
25 standard input. If only the basename of a file is specified, all
26 configuration directories are searched for a matching file and the file
27 found that has the highest priority is executed.
28
30 The following options are understood:
31
32 --root=root
33 Takes a directory path as an argument. All paths will be prefixed
34 with the given alternate root path, including config search paths.
35
36 --replace=PATH
37 When this option is given, one ore more positional arguments must
38 be specified. All configuration files found in the directories
39 listed in sysusers.d(5) will be read, and the configuration given
40 on the command line will be handled instead of and with the same
41 priority as the configuration file PATH.
42
43 This option is intended to be used when package installation
44 scripts are running and files belonging to that package are not yet
45 available on disk, so their contents must be given on the command
46 line, but the admin configuration might already exist and should be
47 given higher priority.
48
49 Example 1. RPM installation script for radvd
50
51 echo 'u radvd - "radvd daemon"' | \
52 systemd-sysusers --replace=/usr/lib/sysusers.d/radvd.conf -
53
54 This will create the radvd user as if
55 /usr/lib/sysusers.d/radvd.conf was already on disk. An admin might
56 override the configuration specified on the command line by placing
57 /etc/sysusers.d/radvd.conf or even
58 /etc/sysusers.d/00-overrides.conf.
59
60 Note that this is the expanded form, and when used in a package,
61 this would be written using a macro with "radvd" and a file
62 containing the configuration line as arguments.
63
64 --inline
65 Treat each positional argument as a separate configuration line
66 instead of a file name.
67
68 --cat-config
69 Copy the contents of config files to standard output. Before each
70 file, the filename is printed as a comment.
71
72 --no-pager
73 Do not pipe output into a pager.
74
75 -h, --help
76 Print a short help text and exit.
77
78 --version
79 Print a short version string and exit.
80
82 On success, 0 is returned, a non-zero failure code otherwise.
83
85 systemd(1), sysusers.d(5), Users, Groups, UIDs and GIDs on systemd
86 systems[1]
87
89 1. Users, Groups, UIDs and GIDs on systemd systems
90 https://systemd.io/UIDS-GIDS
91
92
93
94systemd 246 SYSTEMD-SYSUSERS(8)