1 diff -urpa shadow-4.8.orig/libmisc/chkname.c shadow-4.8/libmisc/chkname.c
2 --- shadow-4.8.orig/libmisc/chkname.c 2019-10-05 03:23:58.000000000 +0200
3 +++ shadow-4.8/libmisc/chkname.c 2019-12-15 23:50:06.137000000 +0100
4 @@ -55,21 +55,28 @@ static bool is_valid_name (const char *n
8 - * User/group names must match [a-z_][a-z0-9_-]*[$]
9 + * User/group names must match gnu e-regex:
10 + * [a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]?
12 + * as a non-POSIX, extension, allow "$" as the last char for
13 + * sake of Samba 3.x "add machine script"
16 - if (('\0' == *name) ||
17 - !((('a' <= *name) && ('z' >= *name)) || ('_' == *name))) {
18 + if ( ('\0' == *name) ||
19 + !((*name >= 'a' && *name <= 'z') ||
20 + (*name >= 'A' && *name <= 'Z') ||
21 + (*name >= '0' && *name <= '9') ||
22 + (*name == '_') || (*name == '.')
27 while ('\0' != *++name) {
28 - if (!(( ('a' <= *name) && ('z' >= *name) ) ||
29 - ( ('0' <= *name) && ('9' >= *name) ) ||
32 - ( ('$' == *name) && ('\0' == *(name + 1)) )
34 + if (!( (*name >= 'a' && *name <= 'z') ||
35 + (*name >= 'A' && *name <= 'Z') ||
36 + (*name >= '0' && *name <= '9') ||
37 + (*name == '_') || (*name == '.') || (*name == '-') ||
38 + (*name == '$' && *(name + 1) == '\0')
43 diff -urpa shadow-4.8.orig/man/groupadd.8.xml shadow-4.8/man/groupadd.8.xml
44 --- shadow-4.8.orig/man/groupadd.8.xml 2019-07-23 17:26:08.000000000 +0200
45 +++ shadow-4.8/man/groupadd.8.xml 2019-12-15 23:41:44.562000000 +0100
47 <refsect1 id='caveats'>
48 <title>CAVEATS</title>
50 - Groupnames must start with a lower case letter or an underscore,
51 - followed by lower case letters, digits, underscores, or dashes.
52 - They can end with a dollar sign.
53 - In regular expression terms: [a-z_][a-z0-9_-]*[$]?
56 Groupnames may only be up to &GROUP_NAME_MAX_LENGTH; characters long.
59 diff -urpa shadow-4.8.orig/man/man8/groupadd.8 shadow-4.8/man/man8/groupadd.8
60 --- shadow-4.8.orig/man/man8/groupadd.8 2019-12-01 18:45:34.000000000 +0100
61 +++ shadow-4.8/man/man8/groupadd.8 2019-12-15 23:41:44.563000000 +0100
62 @@ -197,9 +197,7 @@ Shadow password suite configuration\&.
66 -Groupnames must start with a lower case letter or an underscore, followed by lower case letters, digits, underscores, or dashes\&. They can end with a dollar sign\&. In regular expression terms: [a\-z_][a\-z0\-9_\-]*[$]?
68 -Groupnames may only be up to 16 characters long\&.
69 +Groupnames may only be up to 32 characters long\&.
71 You may not add a NIS or LDAP group\&. This must be performed on the corresponding server\&.
73 diff -urpa shadow-4.8.orig/man/man8/useradd.8 shadow-4.8/man/man8/useradd.8
74 --- shadow-4.8.orig/man/man8/useradd.8 2019-12-01 18:45:38.000000000 +0100
75 +++ shadow-4.8/man/man8/useradd.8 2019-12-15 23:41:44.563000000 +0100
76 @@ -226,7 +226,7 @@ is not enabled, no home directories are
78 \fB\-M\fR, \fB\-\-no\-create\-home\fR
80 -Do no create the user\*(Aqs home directory, even if the system wide setting from
81 +Do not create the user\*(Aqs home directory, even if the system wide setting from
83 (\fBCREATE_HOME\fR) is set to
85 @@ -440,8 +440,6 @@ Similarly, if the username already exist
87 will deny the user account creation request\&.
89 -Usernames must start with a lower case letter or an underscore, followed by lower case letters, digits, underscores, or dashes\&. They can end with a dollar sign\&. In regular expression terms: [a\-z_][a\-z0\-9_\-]*[$]?
91 Usernames may only be up to 32 characters long\&.
94 diff -urpa shadow-4.8.orig/man/useradd.8.xml shadow-4.8/man/useradd.8.xml
95 --- shadow-4.8.orig/man/useradd.8.xml 2019-10-05 03:23:58.000000000 +0200
96 +++ shadow-4.8/man/useradd.8.xml 2019-12-15 23:41:44.563000000 +0100
101 - Do no create the user's home directory, even if the system
102 + Do not create the user's home directory, even if the system
103 wide setting from <filename>/etc/login.defs</filename>
104 (<option>CREATE_HOME</option>) is set to
105 <replaceable>yes</replaceable>.
110 - Usernames must start with a lower case letter or an underscore,
111 - followed by lower case letters, digits, underscores, or dashes.
112 - They can end with a dollar sign.
113 - In regular expression terms: [a-z_][a-z0-9_-]*[$]?
116 Usernames may only be up to 32 characters long.