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