summarylogtreecommitdiffstats
path: root/arch-policy.patch
blob: 19b817d7b0e46631b2dbb0ed2f0187044b23ce33 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
diff --git a/AdduserCommon.pm b/AdduserCommon.pm
index 46ff6de..0a31847 100644
--- a/AdduserCommon.pm
+++ b/AdduserCommon.pm
@@ -88,8 +88,8 @@ use constant {
     numberre => qr/[0-9]+/,
     namere => qr/^([^-+~:,\s\/][^:,\s\/]*)$/aa,
     anynamere => qr/^([^-+~:,\s\/][^:,\s\/]*)$/aa,
-    def_name_regex => qr/^[a-zA-Z][a-zA-Z0-9_-]*\$?$/aa,
-    def_sys_name_regex => qr/^[a-zA-Z_][a-zA-Z0-9_-]*\$?$/aa,
+    def_name_regex => qr/^[a-zA-Z0-9_][a-zA-Z0-9_-]*\$?$/aa,
+    def_sys_name_regex => qr/^[a-zA-Z0-9_][a-zA-Z0-9_-]*\$?$/aa,
     def_ieee_name_regex => qr/^[a-zA-Z0-9_.][a-zA-Z0-9_.-]*\$?$/aa,
     def_min_regex => qr(^[^-+~:,\s/][^:,\s/]*$)aa,
 };
@@ -485,18 +485,18 @@ sub preseed_config {
         backup => 0,
         backup_to => ".",
         dshell => "/bin/bash",
-        first_system_uid => 100,
+        first_system_uid => 500,
         last_system_uid => 999,
         first_uid => 1000,
-        last_uid => 59999,
-        first_system_gid => 100,
+        last_uid => 60000,
+        first_system_gid => 500,
         last_system_gid => 999,
         first_gid => 1000,
-        last_gid => 59999,
+        last_gid => 60000,
         dhome => "/home",
         skel => "/etc/skel",
         usergroups => "yes",
-        users_gid => undef,
+        users_gid => -1,
         users_group => undef,
         grouphomes => "no",
         letterhomes => "no",
diff --git a/adduser.conf b/adduser.conf
index ff82f9e..ee9eb85 100644
--- a/adduser.conf
+++ b/adduser.conf
@@ -31,21 +31,21 @@
 # Specify inclusive ranges of UIDs and GIDs from which UIDs and GIDs
 # for system users, system groups, non-system users and non-system groups
 # can be dynamically allocated.
-# Default: FIRST_SYSTEM_UID=100, LAST_SYSTEM_UID=999
-#FIRST_SYSTEM_UID=100
+# Default: FIRST_SYSTEM_UID=500, LAST_SYSTEM_UID=999
+#FIRST_SYSTEM_UID=500
 #LAST_SYSTEM_UID=999
 
-# Default: FIRST_SYSTEM_GID=100, LAST_SYSTEM_GID=999
-#FIRST_SYSTEM_GID=100
+# Default: FIRST_SYSTEM_GID=500, LAST_SYSTEM_GID=999
+#FIRST_SYSTEM_GID=500
 #LAST_SYSTEM_GID=999
 
-# Default: FIRST_UID=1000, LAST_UID=59999
+# Default: FIRST_UID=1000, LAST_UID=60000
 #FIRST_UID=1000
-#LAST_UID=59999
+#LAST_UID=60000
 
-# Default: FIRST_GID=1000, LAST_GID=59999
+# Default: FIRST_GID=1000, LAST_GID=60000
 #FIRST_GID=1000
-#LAST_GID=59999
+#LAST_GID=60000
 
 # Specify a file or a directory containing UID and GID pool.
 #UID_POOL=/etc/adduser-pool.conf
@@ -64,7 +64,8 @@
 # non-system users are placed into.
 # It is a configuration error to define both variables
 # even if the values are consistent.
-# Default: USERS_GID=undefined, USERS_GROUP=users
+# Set USERS_GID=-1 to disable this functionality.
+# Default: USERS_GID=-1, USERS_GROUP is undefined
 #USERS_GID=100
 #USERS_GROUP=users
 
@@ -89,14 +90,14 @@
 # scripts. Therefore, the default is more restrictive than RFC8265 would
 # allow. Local administrators might relax this regexp as far as useradd
 # will allow.
-# Default: NAME_REGEX="^[a-zA-Z][a-zA-Z0-9_-]*\$?$"
-#NAME_REGEX="^[a-zA-Z][a-zA-Z0-9_-]*\$?$"
+# Default: NAME_REGEX="^[a-zA-Z0-9_][a-zA-Z0-9_-]*\$?$"
+#NAME_REGEX="^[a-zA-Z0-9_][a-zA-Z0-9_-]*\$?$"
 
 # System user- and groupnames are checked against this regular
 # expression. Comments from above apply as well, but changes here may
 # affect package installation.
-# Default: SYS_NAME_REGEX="^[a-zA-Z_][a-zA-Z0-9_-]*\$?$"
-#SYS_NAME_REGEX="^[a-zA-Z_][a-zA-Z0-9_-]*\$?$"
+# Default: SYS_NAME_REGEX="^[a-zA-Z0-9_][a-zA-Z0-9_-]*\$?$"
+#SYS_NAME_REGEX="^[a-zA-Z0-9_][a-zA-Z0-9_-]*\$?$"
 
 # When populating the newly created home directory of a non-system user,
 # files in SKEL matching this regex are not copied.
diff --git a/doc/adduser.conf.5 b/doc/adduser.conf.5
index 2e61b63..d8c62b9 100644
--- a/doc/adduser.conf.5
+++ b/doc/adduser.conf.5
@@ -68,17 +68,17 @@ Defaults to \fIusers\fP.
 .B FIRST_SYSTEM_GID " and " LAST_SYSTEM_GID
 specify an inclusive range of GIDs from which GIDs
 for system groups can be dynamically allocated.
-Defaults to \fI100\fP - \fI999\fP.
+Defaults to \fI500\fP - \fI999\fP.
 .TP
 .B FIRST_GID " and " LAST_GID
 specify an inclusive range of GIDs from which GIDs
 for non-system groups can be dynamically allocated.
-Defaults to \fI1000\fP - \fI59999\fP.
+Defaults to \fI1000\fP - \fI60000\fP.
 .TP
 .B FIRST_SYSTEM_UID " and " LAST_SYSTEM_UID
 specify an inclusive range of UIDs from which UIDs
 for system users can be dynamically allocated.
-Defaults to \fI100\fP - \fI999\fP.
+Defaults to \fI500\fP - \fI999\fP.
 Please note that system software,
 such as the users allocated by the \fIbase-passwd\fP package,
 may assume that UIDs less than 100 are unallocated.
@@ -86,7 +86,7 @@ may assume that UIDs less than 100 are unallocated.
 .B FIRST_UID " and " LAST_UID
 specify an inclusive range of UIDs from which UIDs
 for non-system users can be dynamically allocated.
-Defaults to \fI1000\fP - \fI59999\fP.
+Defaults to \fI1000\fP - \fI60000\fP.
 .TP
 .B GID_POOL
 See \fBUID_POOL\fP.
@@ -119,7 +119,7 @@ user and group creation in \fBadduser\fR(8) is refused
 unless \fB\-\-allow\-bad\-names\fR is set.
 With \fB\-\-allow\-bad\-names\fR set,
 weaker checks are performed.
-Defaults to the most conservative \fI^[a\-zA\-Z][a\-zA\-Z0\-9_\-]*\\$?$\fP.
+Defaults to the Arch policy \fI^[a\-zA\-Z0\-9_][a\-zA\-Z0\-9_\-]*\\$?$\fP.
 See \fBSYS_NAME_REGEX\fP and \fBValid names\fP,
 below, for more information.
 .TP
@@ -173,7 +173,7 @@ system user and group creation in adduser is refused
 unless \fB\-\-allow\-bad\-names\fP is set.
 With \fB\-\-allow\-bad\-names\fP set,
 weaker checks are performed.
-Defaults to the most conservative \fI^[a\-zA\-Z_][a\-zA\-Z0\-9_\-]*\\$?$\fP.
+Defaults to the Arch policy \fI^[a\-zA\-Z0\-9_][a\-zA\-Z0\-9_\-]*\\$?$\fP.
 See \fBNAME_REGEX\fP, above, and \fBValid names\fP,
 below, for more information.
 .TP