]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
docs: hook up the new USER_NAMES document everywhere
authorLennart Poettering <lennart@poettering.net>
Tue, 7 Apr 2020 09:04:59 +0000 (11:04 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 8 Apr 2020 15:30:04 +0000 (17:30 +0200)
(Also correct the set of names we accept in User=, which was forgotten
to be updated in ae480f0b09aec815b64579bb1828ea935d8ee236.

docs/USER_RECORD.md
man/homectl.xml
man/systemd.exec.xml
man/sysusers.d.xml

index 3bc0879a489369e37f8ce1473eb6b52f3bba19dc..b9c21a1fea60d81dc22dfb9692af09a4430cb26f 100644 (file)
@@ -205,7 +205,8 @@ object. The following fields are currently defined:
 UNIX user name. This field is the only mandatory field, all others are
 optional. Corresponds with the `pw_name` field of of `struct passwd` and the
 `sp_namp` field of `struct spwd` (i.e. the shadow user record stored in
-`/etc/shadow`).
+`/etc/shadow`). See [User/Group Name Syntax](https://systemd.io/USER_NAMES) for
+the (relaxed) rules the various systemd components enforce on user/group names.
 
 `realm` → The "realm" a user is defined in. This concept allows distinguishing
 users with the same name that originate in different organizations or
index ae502c8ebbb132530dc760168b80ccf7d70c1422..2d99af93b14eb57430a8a41eca94f4540c551f98 100644 (file)
 
         <listitem><para>Create a new home directory/user account of the specified name. Use the various
         user record property options (as documented above) to control various aspects of the home directory
-        and its user accounts.</para></listitem>
+        and its user accounts.</para>
+
+        <para>The specified user name should follow the strict syntax described on <ulink
+        url="https://systemd.io/USER_NAMES">User/Group Name Syntax</ulink>.</para></listitem>
       </varlistentry>
 
       <varlistentry>
index 79a2c744c64fb15fdb9b05a986d6d89410099c20..fd1755e422a2f652dd7cbfd0d2b5387b14bd97fb 100644 (file)
         is set, the default group of the user is used. This setting does not affect commands whose command line is
         prefixed with <literal>+</literal>.</para>
 
-        <para>Note that restrictions on the user/group name syntax are enforced: the specified name must consist only
-        of the characters a-z, A-Z, 0-9, <literal>_</literal> and <literal>-</literal>, except for the first character
-        which must be one of a-z, A-Z or <literal>_</literal> (i.e. numbers and <literal>-</literal> are not permitted
-        as first character). The user/group name must have at least one character, and at most 31. These restrictions
-        are enforced in order to avoid ambiguities and to ensure user/group names and unit files remain portable among
-        Linux systems.</para>
+        <para>Note that this enforces only weak restrictions on the user/group name syntax, but will generate
+        warnings in many cases where user/group names do not adhere to the following rules: the specified
+        name should consist only of the characters a-z, A-Z, 0-9, <literal>_</literal> and
+        <literal>-</literal>, except for the first character which must be one of a-z, A-Z and
+        <literal>_</literal> (i.e. digits and <literal>-</literal> are not permitted as first character). The
+        user/group name must have at least one character, and at most 31. These restrictions are made in
+        order to avoid ambiguities and to ensure user/group names and unit files remain portable among Linux
+        systems. For further details on the names accepted and the names warned about see <ulink
+        url="https://systemd.io/USER_NAMES">User/Group Name Syntax</ulink>.</para>
 
         <para>When used in conjunction with <varname>DynamicUser=</varname> the user/group name specified is
         dynamically allocated at the time the service is started, and released at the time the service is
index c632e8713e97d9690d54979d2d32ba79ca670966..f0e0f2bedc1606f38de928da2fa5ed54b0bc64ef 100644 (file)
@@ -154,6 +154,9 @@ r     -        500-900
       A-Z or <literal>_</literal> (i.e. numbers and <literal>-</literal> are not permitted as first character). The
       user/group name must have at least one character, and at most 31.</para>
 
+      <para>For further details about the syntax of user/group names, see <ulink
+      url="https://systemd.io/USER_NAMES">User/Group Name Syntax</ulink>.</para>
+
       <para>It is strongly recommended to pick user and group names that are unlikely to clash with normal users
       created by the administrator. A good scheme to guarantee this is by prefixing all system and group names with the
       underscore, and avoiding too generic names.</para>