chiark / gitweb /
networkd: send hostname to dhcp server
[elogind.git] / man / sysusers.d.xml
1 <?xml version="1.0"?>
2 <!--*-nxml-*-->
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4 <!--
5   This file is part of systemd.
6
7   Copyright 2014 Lennart Poettering
8
9   systemd is free software; you can redistribute it and/or modify it
10   under the terms of the GNU Lesser General Public License as published by
11   the Free Software Foundation; either version 2.1 of the License, or
12   (at your option) any later version.
13
14   systemd is distributed in the hope that it will be useful, but
15   WITHOUT ANY WARRANTY; without even the implied warranty of
16   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17   Lesser General Public License for more details.
18
19   You should have received a copy of the GNU Lesser General Public License
20   along with systemd; If not, see <http://www.gnu.org/licenses/>.
21 -->
22 <refentry id="sysusers.d">
23
24         <refentryinfo>
25                 <title>sysusers.d</title>
26                 <productname>systemd</productname>
27
28                 <authorgroup>
29                         <author>
30                                 <contrib>Developer</contrib>
31                                 <firstname>Lennart</firstname>
32                                 <surname>Poettering</surname>
33                                 <email>lennart@poettering.net</email>
34                         </author>
35                 </authorgroup>
36         </refentryinfo>
37
38         <refmeta>
39                 <refentrytitle>sysusers.d</refentrytitle>
40                 <manvolnum>5</manvolnum>
41         </refmeta>
42
43         <refnamediv>
44                 <refname>sysusers.d</refname>
45                 <refpurpose>Declarative allocation of system users and groups</refpurpose>
46         </refnamediv>
47
48         <refsynopsisdiv>
49                 <para><filename>/usr/lib/sysusers.d/*.conf</filename></para>
50         </refsynopsisdiv>
51
52         <refsect1>
53                 <title>Description</title>
54
55                 <para><command>systemd-sysusers</command> uses the
56                 files from <filename>/usr/lib/sysusers.d/</filename>
57                 to create system users and groups at package
58                 installation or boot time. This tool may be used for
59                 allocating system users and groups only, it is not
60                 useful for creating non-system users and groups, as it
61                 accessed <filename>/etc/passwd</filename> and
62                 <filename>/etc/group</filename> directly, bypassing
63                 any more complex user database, for example any
64                 database involving NIS or LDAP.</para>
65
66         </refsect1>
67
68         <refsect1>
69                 <title>File Format</title>
70
71                 <para>Each file shall be named in the style of
72                 <filename><replaceable>package</replaceable>.conf</filename>.</para>
73
74                 <para>All files are sorted by their filename in
75                 lexicographic order, regardless of which of the
76                 directories they reside in. If multiple files specify
77                 the same user or group, the entry in the file with the
78                 lexicographically earliest name will be applied, all
79                 all other conflicting entries will be logged as
80                 errors. Users and groups are
81                 processed in the order they are listed.</para>
82
83                 <para>The file format is one line per user or group
84                 containing name, ID and GECOS field description:</para>
85
86                 <programlisting># Type Name ID GECOS
87 u httpd 440 "HTTP User"
88 u authd /usr/bin/authd "Authorization user"
89 g input - -</programlisting>
90
91                 <refsect2>
92                         <title>Type</title>
93
94                         <para>The type consists of a single
95                         letter. The following line types are
96                         understood:</para>
97
98                         <variablelist>
99                                 <varlistentry>
100                                         <term><varname>u</varname></term>
101                                         <listitem><para>Create a
102                                         system user and group of the
103                                         specified name should they not
104                                         exist yet. The user's primary
105                                         group will be set to the group
106                                         bearing the same name. The
107                                         user's shell will be set to
108                                         <filename>/sbin/login</filename>,
109                                         the home directory to
110                                         <filename>/</filename>. The
111                                         account will be created
112                                         disabled, so that logins are
113                                         not allowed.</para></listitem>
114                                 </varlistentry>
115
116                                 <varlistentry>
117                                         <term><varname>g</varname></term>
118                                         <listitem><para>Create a
119                                         system group of the specified
120                                         name should it not exist
121                                         yet. Note that
122                                         <varname>u</varname>
123                                         implicitly create a matching
124                                         group. The group will be
125                                         created with no password
126                                         set.</para></listitem>
127                                 </varlistentry>
128                         </variablelist>
129                 </refsect2>
130
131                 <refsect2>
132                         <title>Name</title>
133
134                         <para>The name field specifies the user or
135                         group name. It should be be shorter than 256
136                         characters and avoid any non-ASCII characters,
137                         and not begin with a numeric character. It is
138                         strongly recommended to pick user and group
139                         names that are unlikely to clash with normal
140                         users created by the administrator. A good
141                         scheme to guarantee this is by prefixing all
142                         system and group names with the underscore,
143                         and avoiding too generic names.</para>
144                 </refsect2>
145
146                 <refsect2>
147                         <title>ID</title>
148
149                         <para>The numeric 32bit UID or GID of the
150                         user/group. Do not use IDs 65535 or
151                         4294967295, as they have special placeholder
152                         meanings. Specify "-" for automatic UID/GID
153                         allocation for the user or
154                         group. Alternatively, specify an absolute path
155                         in the file system. In this case the UID/GID
156                         is read from the path's owner/group. This is
157                         useful to create users whose UID/GID match the
158                         owners of pre-existing files (such as SUID or
159                         SGID binaries).</para>
160                 </refsect2>
161
162                 <refsect2>
163                         <title>GECOS</title>
164
165                         <para>A short, descriptive string for users to
166                         be created, enclosed in quotation marks. Note
167                         that this field may not contain colons.</para>
168                 </refsect2>
169
170         </refsect1>
171
172         <refsect1>
173                 <title>See Also</title>
174                 <para>
175                         <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
176                         <citerefentry><refentrytitle>systemd-sysusers</refentrytitle><manvolnum>8</manvolnum></citerefentry>
177                 </para>
178         </refsect1>
179
180 </refentry>