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