]>
Commit | Line | Data |
---|---|---|
21236ab5 LP |
1 | <?xml version='1.0'?> <!--*-nxml-*--> |
2 | <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" | |
12b42c76 | 3 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"> |
21236ab5 LP |
4 | |
5 | <!-- | |
572eb058 | 6 | SPDX-License-Identifier: LGPL-2.1+ |
21236ab5 LP |
7 | --> |
8 | ||
9 | <refentry id="systemd-sysusers" | |
798d3a52 ZJS |
10 | xmlns:xi="http://www.w3.org/2001/XInclude"> |
11 | ||
12 | <refentryinfo> | |
13 | <title>systemd-sysusers</title> | |
14 | <productname>systemd</productname> | |
798d3a52 ZJS |
15 | </refentryinfo> |
16 | ||
17 | <refmeta> | |
18 | <refentrytitle>systemd-sysusers</refentrytitle> | |
19 | <manvolnum>8</manvolnum> | |
20 | </refmeta> | |
21 | ||
22 | <refnamediv> | |
23 | <refname>systemd-sysusers</refname> | |
24 | <refname>systemd-sysusers.service</refname> | |
25 | <refpurpose>Allocate system users and groups</refpurpose> | |
26 | </refnamediv> | |
27 | ||
28 | <refsynopsisdiv> | |
29 | <cmdsynopsis> | |
30 | <command>systemd-sysusers</command> | |
31 | <arg choice="opt" rep="repeat">OPTIONS</arg> | |
32 | <arg choice="opt" rep="repeat"><replaceable>CONFIGFILE</replaceable></arg> | |
33 | </cmdsynopsis> | |
34 | ||
35 | <para><filename>systemd-sysusers.service</filename></para> | |
36 | </refsynopsisdiv> | |
37 | ||
38 | <refsect1> | |
39 | <title>Description</title> | |
40 | ||
41 | <para><command>systemd-sysusers</command> creates system users and | |
42 | groups, based on the file format and location specified in | |
43 | <citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
44 | </para> | |
45 | ||
d16a1c1b ZJS |
46 | <para>If invoked with no arguments, it applies all directives from all files |
47 | found in the directories specified by | |
48 | <citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>. | |
49 | When invoked with positional arguments, if option | |
50 | <option>--replace=<replaceable>PATH</replaceable></option> is specified, arguments | |
51 | specified on the command line are used instead of the configuration file | |
52 | <replaceable>PATH</replaceable>. Otherwise, just the configuration specified by | |
53 | the command line arguments is executed. The string <literal>-</literal> may be | |
54 | specified instead of a filename to instruct <command>systemd-sysusers</command> | |
55 | to read the configuration from standard input. If only the basename of a file is | |
56 | specified, all configuration directories are searched for a matching file and | |
57 | the file found that has the highest priority is executed.</para> | |
798d3a52 ZJS |
58 | </refsect1> |
59 | ||
60 | <refsect1> | |
61 | <title>Options</title> | |
62 | ||
63 | <para>The following options are understood:</para> | |
64 | ||
65 | <variablelist> | |
66 | <varlistentry> | |
67 | <term><option>--root=<replaceable>root</replaceable></option></term> | |
68 | <listitem><para>Takes a directory path as an argument. All | |
69 | paths will be prefixed with the given alternate | |
70 | <replaceable>root</replaceable> path, including config search | |
71 | paths. </para></listitem> | |
72 | </varlistentry> | |
73 | ||
d16a1c1b ZJS |
74 | <varlistentry> |
75 | <term><option>--replace=<replaceable>PATH</replaceable></option></term> | |
76 | <listitem><para>When this option is given, one ore more positional arguments | |
77 | must be specified. All configuration files found in the directories listed in | |
78 | <citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
79 | will be read, and the configuration given on the command line will be | |
80 | handled instead of and with the same priority as the configuration file | |
81 | <replaceable>PATH</replaceable>.</para> | |
82 | ||
83 | <para>This option is intended to be used when package installation scripts | |
84 | are running and files belonging to that package are not yet available on | |
85 | disk, so their contents must be given on the command line, but the admin | |
86 | configuration might already exist and should be given higher priority. | |
87 | </para> | |
88 | ||
89 | <example> | |
90 | <title>RPM installation script for radvd</title> | |
91 | ||
92 | <programlisting>echo 'u radvd - "radvd daemon"' | \ | |
93 | systemd-sysusers --replace=/usr/lib/sysusers.d/radvd.conf -</programlisting> | |
94 | ||
95 | <para>This will create the radvd user as if | |
96 | <filename>/usr/lib/sysusers.d/radvd.conf</filename> was already on disk. | |
97 | An admin might override the configuration specified on the command line by | |
98 | placing <filename>/etc/sysusers.d/radvd.conf</filename> or even | |
99 | <filename>/etc/sysusers.d/00-overrides.conf</filename>.</para> | |
100 | ||
101 | <para>Note that this is the expanded from, and when used in a package, this | |
102 | would be written using a macro with "radvd" and a file containing the | |
103 | configuration line as arguments.</para> | |
104 | </example> | |
105 | </listitem> | |
106 | </varlistentry> | |
107 | ||
1b600bd5 ZJS |
108 | <varlistentry> |
109 | <term><option>--inline</option></term> | |
110 | <listitem><para>Treat each positional argument as a separate configuration | |
111 | line instead of a file name.</para></listitem> | |
112 | </varlistentry> | |
113 | ||
ec0327d6 | 114 | <xi:include href="standard-options.xml" xpointer="cat-config" /> |
dcd5c891 | 115 | <xi:include href="standard-options.xml" xpointer="no-pager" /> |
798d3a52 ZJS |
116 | <xi:include href="standard-options.xml" xpointer="help" /> |
117 | <xi:include href="standard-options.xml" xpointer="version" /> | |
118 | </variablelist> | |
119 | ||
120 | </refsect1> | |
121 | ||
122 | <refsect1> | |
123 | <title>Exit status</title> | |
124 | ||
125 | <para>On success, 0 is returned, a non-zero failure code | |
126 | otherwise.</para> | |
127 | </refsect1> | |
128 | ||
129 | <refsect1> | |
130 | <title>See Also</title> | |
131 | <para> | |
132 | <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>, | |
133 | <citerefentry><refentrytitle>sysusers.d</refentrytitle><manvolnum>5</manvolnum></citerefentry> | |
134 | </para> | |
135 | </refsect1> | |
21236ab5 LP |
136 | |
137 | </refentry> |