[Pkg-shadow-devel] [Git][debian/adduser][master] 20 commits: bump internal version number of modules
Marc Haber (@zugschlus)
gitlab at salsa.debian.org
Wed Feb 19 14:18:02 GMT 2025
Marc Haber pushed to branch master at Debian / adduser
Commits:
5eeb0abb by Marc Haber at 2025-02-19T15:06:20+01:00
bump internal version number of modules
Git-Dch: ignore
- - - - -
7d3da243 by Marc Haber at 2025-02-19T15:07:18+01:00
bump copyright year
- - - - -
018f4c7d by Marc Haber at 2025-02-19T15:17:38+01:00
define RET_INVALID_NAME_FROM_USERADD
Git-Dch: ignore
- - - - -
1ed1a32f by Marc Haber at 2025-02-19T15:17:38+01:00
terminology normal => regular
Git-Dch: ignore
- - - - -
fef7bbd4 by Marc Haber at 2025-02-19T15:17:38+01:00
make note to catch useradd exit code
Git-Dch: ignore
- - - - -
a2406bc7 by Marc Haber at 2025-02-19T15:17:38+01:00
README: Add deprecation warnings and removed feature documentation
Git-Dch: ignore
- - - - -
faccd103 by Marc Haber at 2025-02-19T15:17:38+01:00
move VALID NAMES to adduser man page
Git-Dch: ignore
- - - - -
a4a0c51d by Marc Haber at 2025-02-19T15:17:38+01:00
remove language that claim adduser to be friendly
Git-Dch: ignore
- - - - -
fd31bc99 by Marc Haber at 2025-02-19T15:17:38+01:00
don't use "placed in" primary group
Git-Dch: ignore
- - - - -
5c501c85 by Marc Haber at 2025-02-19T15:17:38+01:00
fix typo
- - - - -
04247d6a by Marc Haber at 2025-02-19T15:17:38+01:00
sort LAST options the same as FIRST options
Git-Dch: ignore
- - - - -
706e7289 by Marc Haber at 2025-02-19T15:17:38+01:00
don't list compression suffixes
Git-Dch: ignore
- - - - -
cbc12ac7 by Marc Haber at 2025-02-19T15:17:38+01:00
document new default regexes
Git-Dch: ignore
- - - - -
24083d38 by Marc Haber at 2025-02-19T15:17:38+01:00
there is only one primary group
Git-Dch: ignore
- - - - -
c79842d1 by Marc Haber at 2025-02-19T15:17:38+01:00
--group is an option
Git-Dch: ignore
- - - - -
34614a50 by Marc Haber at 2025-02-19T15:17:38+01:00
make more clear that addgroup --system works as well
Git-Dch: ignore
- - - - -
053783b7 by Marc Haber at 2025-02-19T15:17:38+01:00
fix grammar
Git-Dch: ignore
- - - - -
75b1a9c5 by Marc Haber at 2025-02-19T15:17:38+01:00
remove reference to deprecated --quiet
Git-Dch: ignore
- - - - -
88f50672 by Marc Haber at 2025-02-19T15:17:38+01:00
more docs in man page
Git-Dch: ignore
- - - - -
ee63d4cc by Marc Haber at 2025-02-19T15:17:38+01:00
remove reference to non-ASCII characters
Git-Dch: ignore
- - - - -
14 changed files:
- AdduserCommon.pm
- AdduserLogging.pm
- AdduserRetvalues.pm
- adduser
- debian/NEWS
- debian/README
- debian/copyright
- deluser
- doc/adduser.8
- doc/adduser.conf.5
- doc/adduser.local.8
- doc/deluser.8
- doc/deluser.conf.5
- testsuite/test9.pl
Changes:
=====================================
AdduserCommon.pm
=====================================
@@ -1,4 +1,4 @@
-package Debian::AdduserCommon 3.138;
+package Debian::AdduserCommon 3.139;
use 5.40.0;
use utf8;
use Encode;
@@ -7,7 +7,7 @@ use I18N::Langinfo qw(langinfo CODESET);
# Subroutines shared by the "adduser" and "deluser" utilities.
#
# Copyright (C) 2000-2004 Roland Bauerschmidt <rb at debian.org>
-# 2005-2023 Marc Haber <mh+debian-packages at zugschlus.de>
+# 2005-2025 Marc Haber <mh+debian-packages at zugschlus.de>
# 2023 Guillem Jover <guillem at debian.org>
# 2021-2022 Jason Franklin <jason at oneway.dev>
# 2022 Matt Barry <matt at hazelmollusk.org>
@@ -30,11 +30,11 @@ use parent qw(Exporter);
use Fcntl qw(:flock SEEK_END);
-use Debian::AdduserLogging 3.138;
-use Debian::AdduserRetvalues 3.138;
+use Debian::AdduserLogging 3.139;
+use Debian::AdduserRetvalues 3.139;
BEGIN {
- if ( Debian::AdduserLogging->VERSION != version->declare('3.138') ||
- Debian::AdduserRetvalues->VERSION != version->declare('3.138') ) {
+ if ( Debian::AdduserLogging->VERSION != version->declare('3.139') ||
+ Debian::AdduserRetvalues->VERSION != version->declare('3.139') ) {
die "wrong module version in adduser, check your packaging or path";
}
}
=====================================
AdduserLogging.pm
=====================================
@@ -1,4 +1,4 @@
-package Debian::AdduserLogging 3.138;
+package Debian::AdduserLogging 3.139;
use 5.40.0;
use utf8;
@@ -6,7 +6,7 @@ use utf8;
#
# Subroutines shared by the "adduser" and "deluser" utilities.
#
-# Copyright (C) 2023 Marc Haber <mh+debian-packages at zugschlus.de>
+# Copyright (C) 2025 Marc Haber <mh+debian-packages at zugschlus.de>
#
# License: GPL-2+
=====================================
AdduserRetvalues.pm
=====================================
@@ -1,10 +1,10 @@
-package Debian::AdduserRetvalues 3.138;
+package Debian::AdduserRetvalues 3.139;
use 5.40.0;
use utf8;
# Adduser definitions of return values
#
-# Copyright (C) 2023 Marc Haber <mh+debian-packages at zugschlus.de>
+# Copyright (C) 2025 Marc Haber <mh+debian-packages at zugschlus.de>
#
# License: GPL-2+
@@ -22,6 +22,7 @@ use vars qw(@EXPORT $VAR1);
'RET_NO_PRIMARY_GID',
'RET_INVALID_CHARS_IN_NAME',
'RET_INVALID_HOME_DIRECTORY',
+ 'RET_INVALID_NAME_FROM_USERADD',
'RET_GROUP_NOT_EMPTY',
'RET_USER_NOT_IN_GROUP',
'RET_NO_PRIMARY_GROUP',
@@ -62,6 +63,7 @@ use constant RET_NO_PRIMARY_GID => 23; # requested primary GID does not exist
use constant RET_INVALID_CHARS_IN_NAME => 31; # the provided name contains invalid characters
use constant RET_INVALID_HOME_DIRECTORY => 32; # the provided name contains invalid characters
+use constant RET_INVALID_NAME_FROM_USERADD => 32; # useradd returned 19 "invalid user or group name"
# group membership errors
=====================================
adduser
=====================================
@@ -1,7 +1,7 @@
#! /usr/bin/perl -T
# Copyright (C) 2000-2004 Roland Bauerschmidt <rb at debian.org>
-# 2005-2024 Marc Haber <mh+debian-packages at zugschlus.de>
+# 2005-2025 Marc Haber <mh+debian-packages at zugschlus.de>
# 2022 Benjamin Drung <benjamin.drung at canonical.com>
# 2023 Guillem Jover <guillem at debian.org>
# 2021-2022 Jason Franklin <jason at oneway.dev>
@@ -28,13 +28,13 @@ use Encode;
use Getopt::Long;
-use Debian::AdduserCommon 3.138;
-use Debian::AdduserLogging 3.138;
-use Debian::AdduserRetvalues 3.138;
+use Debian::AdduserCommon 3.139;
+use Debian::AdduserLogging 3.139;
+use Debian::AdduserRetvalues 3.139;
BEGIN {
- if ( Debian::AdduserCommon->VERSION != version->declare('3.138') ||
- Debian::AdduserLogging->VERSION != version->declare('3.138') ||
- Debian::AdduserRetvalues->VERSION != version->declare('3.138') ) {
+ if ( Debian::AdduserCommon->VERSION != version->declare('3.139') ||
+ Debian::AdduserLogging->VERSION != version->declare('3.139') ||
+ Debian::AdduserRetvalues->VERSION != version->declare('3.139') ) {
die "wrong module version in adduser, check your packaging or path";
}
}
@@ -635,6 +635,7 @@ if ($action eq "addsysuser") {
'-s', $shell,
'-u', $new_uid,
$new_name);
+ ##+# TODO: Catch exit code 19 "invalid user name"
release_lock(0);
@@ -862,6 +863,7 @@ if ($action eq "adduser") {
my $useradd = &which('useradd');
&systemcall($useradd, '-d', $home_dir, '-g', $primary_gid, '-s',
$shell, '-u', $new_uid, $new_name);
+ ##+# TODO: Catch exit code 19 "invalid user name"
create_homedir (1); # copy skeleton data
@@ -1086,7 +1088,7 @@ sub existing_user_ok {
return 1;
}
# TODO: do we really need this code? Range check should not be performed here
- # also, we might be checking a normal user as well here
+ # also, we might be checking a regular user as well here
if( $uid >= $config{"first_system_uid"} &&
$uid <= $config{"last_system_uid" } ) {
return 2;
@@ -1113,7 +1115,7 @@ sub existing_group_ok {
# TODO: is this check required? There should not be any
# gid outside of our allowed range anyways ...
- # also, we might be checking a normal user as well here
+ # also, we might be checking a regular user as well here
if( $gid >= $config{"first_system_gid"} &&
$gid <= $config{"last_system_gid" } ) {
return 3;
@@ -1499,7 +1501,7 @@ sub usage {
[--disabled-password] [--disabled-login]
[--conf file] [--quiet] [--verbose] [--debug]
user
- Add a normal user
+ Add a regular user
adduser --system
[--uid id] [--group] [--ingroup group] [--gid id]
=====================================
debian/NEWS
=====================================
@@ -98,7 +98,7 @@ adduser (3.123) unstable; urgency=medium
for SYS_DIR_MODE is still 0755.
Note that the default for DIR_MODE is a change from historical defaults,
- which were more permissive for normal user home directories.
+ which were more permissive for regular user home directories.
Adjustments may need to be made for setups like public_html
web content, or in-homedir mail configurations.
=====================================
debian/README
=====================================
@@ -37,6 +37,31 @@ repeated in this README file.
+Deprecation warnings
+--------------------
+The following features, options, and other things are deprecated and
+might vanish in the next release:
+- the GROUPHOMES, LETTERHOMES, SETGID_HOME configuration options
+- the --add_extra_groups spelling of the --add-extra-groups option
+- the --gecos alias for the --comment option
+- the --debug alias for the --stdoutmsglevel=debug option
+- the --quiet alias for the --stdoutmsglevel=warn option
+- the --verbose alias for the --stdoutmsglevel=info option
+- the --force-badname and --allow-badname aliases for the
+ --allow-bad-names option
+
+
+
+Removed features
+----------------
+The following features, options, and other things were removed in one of
+the last releases:
+- interactivity
+- debconf
+- support for directory services such as NIS and LDAP
+
+
+
Usage in maintainer scripts
---------------------------
The reference to create users and groups related to packages is
=====================================
debian/copyright
=====================================
@@ -13,7 +13,7 @@ Copyright: 1994 Debian Association, Inc.
2005-2009 Joerg Hoh <joerg at joerghoh.de>
2006-2011 Stephen Gran <sgran at debian.org>
2001-2016 John Zaitseff
- 2004-2023 Marc Haber <mh+debian-packages at zugschlus.de>
+ 2004-2025 Marc Haber <mh+debian-packages at zugschlus.de>
2021-2023 Jason Franklin <jason at oneway.dev>
2022 Matt Barry <matt at hazelmollusk.org>
License: GPL-2+
@@ -32,7 +32,7 @@ Copyright: 2000-2003 Roland Bauerschmidt <rb at debian.org>
2016 Afif Elghraoui <afif at debian.org>
2006-2011 Stephen Gran <sgran at debian.org>
2005-2009 Jörg Hoh <joerg at joerghoh.de>
- 2004-2023 Marc Haber <mh+debian-packages at zugschlus.de>
+ 2004-2025 Marc Haber <mh+debian-packages at zugschlus.de>
2021-2022 Jason Franklin <jason at oneway.dev>
2022 Matt Barry <matt at hazelmollusk.org>
License: GPL-2+
@@ -47,7 +47,7 @@ Copyright: 1994 Debian Association, Inc.
2016-2017 Afif Elghraoui <afif at debian.org>
2006-2011 Stephen Gran <sgran at debian.org>
2005-2009 Jörg Hoh <joerg at joerghoh.de>
- 2004-2023 Marc Haber <mh+debian-packages at zugschlus.de>
+ 2004-2025 Marc Haber <mh+debian-packages at zugschlus.de>
2021-2022 Jason Franklin <jason at oneway.dev>
2022 Matt Barry <matt at hazelmollusk.org>
License: GPL-2+
@@ -62,7 +62,7 @@ Copyright: 2000 Roland Bauerschmidt <rb at debian.org>
2016 Afif Elghraoui <afif at debian.org>
2005-2009 Jörg Hoh <joerg at joerghoh.de>
2006-2008 Stephen Gran <sgran at debian.org>
- 2004-2023 Marc Haber <mh+debian-packages at zugschlus.de>
+ 2004-2025 Marc Haber <mh+debian-packages at zugschlus.de>
2021-2022 Jason Franklin <jason at oneway.dev>
2022 Matt Barry <matt at hazelmollusk.org>
License: GPL-2+
@@ -70,7 +70,7 @@ License: GPL-2+
Files: doc/adduser.conf.5
Copyright: 1995 Ted Hajek <tedhajek at boombox.micro.umn.edu>
2000-2003 Roland Bauerschmidt <rb at debian.org>
- 2004-2023 Marc Haber <mh+debian-packages at zugschlus.de>
+ 2004-2025 Marc Haber <mh+debian-packages at zugschlus.de>
2006-2008 Stephen Gran <sgran at debian.org>
2007 Jörg Hoh <joerg at joerghoh.de>
2016 Afif Elghraoui <afif at debian.org>
@@ -82,7 +82,7 @@ License: GPL-2+
Files: doc/deluser.conf.5
Copyright: 1995 Ted Hajek <tedhajek at boombox.micro.umn.edu>
2000-2003 Roland Bauerschmidt <rb at debian.org>
- 2004-2023 Marc Haber <mh+debian-packages at zugschlus.de>
+ 2004-2025 Marc Haber <mh+debian-packages at zugschlus.de>
2006-2007 Jörg Hoh <joerg at joerghoh.de>
2011 Stephen Gran <sgran at debian.org>
2016, 2023 Dr. Helge Kreutzmann <debian at helgefjell.de>
@@ -95,7 +95,7 @@ Copyright: 1994 Ian A. Murdock <imurdock at debian.org>
1995 Ted Hajek <tedhajek at boombox.micro.umn.edu>
1997-1999 Guy Maor
2000-2003 Roland Bauerschmidt <rb at debian.org>
- 2004-2023 Marc Haber <mh+debian-packages at zugschlus.de>
+ 2004-2025 Marc Haber <mh+debian-packages at zugschlus.de>
2006-2009 Jörg Hoh <joerg at joerghoh.de>
2011 Justin B Rye <jbr at edlug.org.uk>
2016, 2023 Dr. Helge Kreutzmann <debian at helgefjell.de>
@@ -107,7 +107,7 @@ Copyright: 1994 Ian A. Murdock <imurdock at debian.org>
1995 Ted Hajek <tedhajek at boombox.micro.umn.edu>
1997-1999 Guy Maor
2000-2003 Roland Bauerschmidt <rb at debian.org>
- 2004-2023 Marc Haber <mh+debian-packages at zugschlus.de>
+ 2004-2025 Marc Haber <mh+debian-packages at zugschlus.de>
2005-2009 Jörg Hoh <joerg at joerghoh.de>
2006-2011 Stephen Gran <sgran at debian.org>
2011 Justin B Rye <jbr at edlug.org.uk>
@@ -119,7 +119,7 @@ Copyright: 1994 Ian A. Murdock <imurdock at debian.org>
License: GPL-2+
Files: doc/adduser.local.8
-Copyright: 2023 Marc Haber <mh+debian-packages at zugschlus.de>
+Copyright: 2025 Marc Haber <mh+debian-packages at zugschlus.de>
License: GPL-2+
Files: po/adduser.pot doc/po4a/po/adduser.pot
@@ -127,7 +127,7 @@ Copyright: 20032-2004 Roland Bauerschmidt <rb at debian.org>
2011 Stephen Gran <sgran at debian.org>
2016, 2023 Dr. Helge Kreutzmann <debian at helgefjell.de>
2016 Afif Elghraoui <afif at debian.org>
- 2005-2023 Marc Haber <mh+debian-packages at zugschlus.de>
+ 2005-2025 Marc Haber <mh+debian-packages at zugschlus.de>
2021-2022 Jason Franklin <jason at oneway.dev>
2022 Matt Barry <matt at hazelmollusk.org>
License: GPL-2+
=====================================
deluser
=====================================
@@ -2,7 +2,7 @@
# Copyright (C) 2000-2003 Roland Bauerschmidt <rb at debian.org>
-# 2005-2024 Marc Haber <mh+debian-packages at zugschlus.de>
+# 2005-2025 Marc Haber <mh+debian-packages at zugschlus.de>
# 2021-2022 Jason Franklin <jason at oneway.dev>
# 2022 Matt Barry <matt at hazelmollusk.org>
# 2016 Afif Elghraoui <afif at debian.org>
@@ -27,13 +27,13 @@ use I18N::Langinfo qw(langinfo CODESET);
use Getopt::Long;
-use Debian::AdduserCommon 3.138;
-use Debian::AdduserLogging 3.138;
-use Debian::AdduserRetvalues 3.138;
+use Debian::AdduserCommon 3.139;
+use Debian::AdduserLogging 3.139;
+use Debian::AdduserRetvalues 3.139;
BEGIN {
- if ( Debian::AdduserCommon->VERSION != version->declare('3.138') ||
- Debian::AdduserLogging->VERSION != version->declare('3.138') ||
- Debian::AdduserRetvalues->VERSION != version->declare('3.138') ) {
+ if ( Debian::AdduserCommon->VERSION != version->declare('3.139') ||
+ Debian::AdduserLogging->VERSION != version->declare('3.139') ||
+ Debian::AdduserRetvalues->VERSION != version->declare('3.139') ) {
die "wrong module version in adduser, check your packaging or path";
}
}
@@ -523,7 +523,7 @@ sub usage {
[--backup-to dir] [--backup-suffix str] [--conf file]
[--quiet] [--verbose] [--debug] user
- remove a normal user from the system
+ remove a regular user from the system
deluser --group [--system] [--only-if-empty] [--conf file] [--quiet]
[--verbose] [--debug] group
=====================================
doc/adduser.8
=====================================
@@ -2,7 +2,7 @@
.\" 1995 Ted Hajek <tedhajek at boombox.micro.umn.edu>
.\" 1997-1999 Guy Maor
.\" 2000-2003 Roland Bauerschmidt <rb at debian.org>
-.\" 2004-2022 Marc Haber <mh+debian-packages at zugschlus.de
+.\" 2004-2025 Marc Haber <mh+debian-packages at zugschlus.de
.\" 2005-2009 Jörg Hoh <joerg at joerghoh.de
.\" 2006-2011 Stephen Gran <sgran at debian.org>
.\" 2011 Justin B Rye <jbr at edlug.org.uk>
@@ -121,12 +121,14 @@ adduser, addgroup \- add or manipulate users or groups
\fBadduser\fP and \fBaddgroup\fP add users and groups to the system
according to command line options
and configuration information in \fI/etc/adduser.conf\fP.
-They are friendlier front ends to the low level tools like
+They are more Debian specific front ends to the
\fBuseradd\fP, \fBgroupadd\fP and \fBusermod\fP programs,
-by default choosing Debian policy conformant UID and GID values,
-creating a home directory with skeletal configuration,
-running a custom script,
-and other features.
+which are more distribution agnostic.
+\fBadduser\fP and \fBaddgroup\fP
+by default choose Debian policy conformant UID and GID values,
+create a home directory with skeletal configuration,
+run a custom script,
+and have other features.
.PP
\fBadduser\fP and \fBaddgroup\fP are intended as a policy layer,
making it easier for package maintainers and local administrators
@@ -149,10 +151,10 @@ For a full list and explanations of all options,
see the OPTIONS section.
.PP
\fBadduser\fP and \fBaddgroup\fP can be run in one of five modes:
-.SS "Add a normal user"
+.SS "Add a regular (non-system) user"
If called with one non-option argument and
without the \fB\-\-system\fP or \fB\-\-group\fP options,
-\fBadduser\fP will add a normal user,
+\fBadduser\fP will add a regular user,
that means a
\fIdynamically allocated user account\fP
in the sense of Debian Policy.
@@ -188,7 +190,7 @@ The interaction between
is explained in detail in
.BR adduser.conf (5).
.PP
-The new user's primary groups can also be overridden
+The new user's primary group can also be overridden
from the command line
with the \fB\-\-gid\fP or \fB\-\-ingroup\fP options
to set the group by id or name,
@@ -226,10 +228,10 @@ from the range specified by
in the configuration file.
This can be overridden with the \fB\-\-uid\fP option.
.PP
-By default, system users are placed in the \fBnogroup\fP group.
-To place the new system user in an already existing group,
+By default, system users are assigned \fBnogroup\fP as primary group.
+To assign an already existing group as primary group,
use the \fB\-\-gid\fP or \fB\-\-ingroup\fP options.
-If the \fB\-\-group\fP is given
+If the \fB\-\-group\fP option is given
and the identically named group does not already exist,
it is created with the same ID.
.PP
@@ -245,7 +247,7 @@ the new system user will have the shell set to
\fBadduser \-\-system\fP does not set a password for the new account.
Skeletal configuration files are not copied.
.PP
-Other options will behave as for the creation of a normal user.
+Other options will behave as for the creation of a regular user.
The files referenced by \fBUID_POOL\fP and \fBGID_POOL\fP are also honored.
.SS "Add a group"
@@ -259,7 +261,8 @@ A
often abbreviated as \fIsystem group\fP
in the context of the \fBadduser\fP package,
will be created
-if \fBadduser\fP is called with the \fB\-\-system\fP option.
+if \fBadduser \-\-group\fP or \fBaddgroup\fP
+are called with the \fB\-\-system\fP option.
.PP
A GID will be chosen from the respective range specified for GIDs
in the configuration file
@@ -296,17 +299,15 @@ Valid modes: \fBadduser\fP, \fBadduser \-\-system\fP.
.TP
.B \-\-allow\-all\-names
Allow any user- and groupname which is supported by the underlying
-\fBuseradd\fP(8), including names containing non-ASCII characters.
-See VALID NAMES in
-.BR adduser.conf (5).
+\fBuseradd\fP(8).
+See VALID NAMES below.
Valid modes: \fBadduser\fP, \fBadduser \-\-system\fP,
\fBaddgroup\fP, \fBaddgroup \-\-system\fP.
.TP
.B \-\-allow\-bad\-names
Disable \fBNAME_REGEX\fP and \fBSYS_NAME_REGEX\fP check of names.
Only a weaker check for validity of the name is applied.
-See VALID NAMES in
-.BR adduser.conf (5).
+See VALID NAMES below.
Valid modes: \fBadduser\fP, \fBadduser \-\-system\fP,
\fBaddgroup\fP, \fBaddgroup \-\-system\fP.
.TP
@@ -475,13 +476,39 @@ respectively.
.BR \-v " , " \-\-version
Display version and copyright information.
+.SH VALID NAMES
+Historically,
+\fBadduser\fP(8) and \fBaddgroup\fP(8) enforced
+conformity to IEEE Std 1003.1-2001,
+which allows only the following characters to appear
+in group- and usernames:
+letters, digits, underscores, periods, at signs (@) and dashes.
+The name may not start with a dash or @.
+The "$" sign is allowed at the end of usernames
+to allow typical Samba machine accounts.
+.PP
+The default settings for \fBNAME_REGEX\fP and \fBSYS_NAME_REGEX\fP
+allow usernames to contain letters and digits,
+plus dash (\-) and underscore (_);
+the name must begin with a letter
+(or an underscore for system users).
+.PP
+The least restrictive policy,
+available by using the \fB\-\-allow-all-names\fP option,
+simply makes the same checks as \fBuseradd\fP(8).
+Please note that useradd's checks have become quite a bit more restrictive
+in Debian 13.
+.PP
+Changing the default behavior can be used to create
+confusing or misleading names; use with caution.
+
.SH LOGGING
.B Adduser
uses extensive and configurable logging to tailor its verbosity to
the needs of the system administrator.
-Every message that \fBadduser\fR print has a priority value
+Every message that \fBadduser\fR prints has a priority value
assigned by the authors.
This priority can not be changed at run time.
Available priority values are
@@ -570,6 +597,11 @@ the selected naming rules.
.B 32
The home directory of a new user must be an absolute path.
.TP
+.B 33
+useradd returned exit code 19 "invalid user or group name".
+That means the user or group name chosen does not fit useradd's restrictions
+and adduser cannot create the user.
+.TP
.B 41
The group that was requested to be deleted is not empty.
.TP
@@ -643,7 +675,7 @@ A syscall terminated with unexpected error.
.PP
Or for many other yet undocumented reasons which
are printed to console then.
-You may then consider to remove \fB\-\-quiet\fP
+You may then consider to increase a log level
to make \fBadduser\fP more verbose.
.SH SECURITY
@@ -741,4 +773,8 @@ to file bugs against the \fBadduser\fP package in this case.
.BR usermod (8),
.BR /usr/share/doc/base-passwd/users-and-groups.html
on any Debian system,
-Debian Policy 9.2.2.
+Debian Policy 9.2.2,
+RFC8264 "PRECIS Framework: Preparation, Enforcement, and Comparison of
+Internationalized Strings in Application Protocols",
+RFC8265 "PRECIS Representing Usernames and Passwords",
+https://wiki.debian.org/UserAccounts.
=====================================
doc/adduser.conf.5
=====================================
@@ -1,6 +1,6 @@
.\" Copyright: 1995 Ted Hajek <tedhajek at boombox.micro.umn.edu>
.\" 2000-2003 Roland Bauerschmidt <rb at debian.org>
-.\" 2004-2022 Marc Haber <mh+debian-packages at zugschlus.de>
+.\" 2004-2025 Marc Haber <mh+debian-packages at zugschlus.de>
.\" 2006-2008 Stephen Gran <sgran at debian.org>
.\" 2007 Jörg Hoh <joerg at joerghoh.de>
.\" 2016 Afif Elghraoui <afif at debian.org>
@@ -48,7 +48,7 @@ The permissions mode for home directories of non-system users
that are created by \fBadduser\fP(8).
Defaults to \fI0700\fP.
Note that there are potential configurations
-(such as /~user web services, or in-home mail delivery)
+(such as ~/user web services, or in-home mail delivery)
which will require changes to the default.
See also \fBSYS_DIR_MODE\fP.
.TP
@@ -96,13 +96,13 @@ If this is set to \fIyes\fP,
the home directories will be created as \fI/home/groupname/user\fP.
Defaults to \fIno\fP. This option is \fBdeprecated\fP and will be removed.
.TP
-.B LAST_GID
-.TQ
.B LAST_SYSTEM_GID
.TQ
-.B LAST_UID
+.B LAST_GID
.TQ
.B LAST_SYSTEM_UID
+.TQ
+.B LAST_UID
See the \fBFIRST_\fP variants of the option.
.TP
.B LETTERHOMES
@@ -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\-z][\-a\-z0\-9_]*$\fP.
+Defaults to the most conservative \fI^[a\-zA\-Z][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\-z_][\-a\-z0\-9_]*$\fP.
+Defaults to the most conservative \fI^[a\-zA\-Z_][a\-zA\-Z0\-9_\-]*\\$?$\fP.
See \fBNAME_REGEX\fP, above, and \fBValid names\fP,
below, for more information.
.TP
@@ -203,37 +203,6 @@ it's defined statically by the \fIbase-passwd\fP package.
It is a configuration error to define both variables
even if the values are consistent.
.SH NOTES
-.SS VALID NAMES
-Historically,
-\fBadduser\fP(8) and \fBaddgroup\fP(8) enforced
-conformity to IEEE Std 1003.1-2001,
-which allows only the following characters to appear
-in group- and usernames:
-letters, digits, underscores, periods, at signs (@) and dashes.
-The name may not start with a dash or @.
-The "$" sign is allowed at the end of usernames
-to allow typical Samba machine accounts.
-.PP
-The default settings for \fBNAME_REGEX\fP and \fBSYS_NAME_REGEX\fP
-allow usernames to contain lowercase letters and digits,
-plus dash (\-) and underscore (_);
-the name must begin with a letter
-(or an underscore for system users).
-.PP
-The least restrictive policy,
-available by using the \fB\-\-allow-all-names\fP option,
-simply makes the same checks as \fBuseradd\fP(8):
-cannot start with a dash, plus sign, or tilde;
-and cannot contain a colon, comma, slash, or whitespace.
-.PP
-This option can be used to create confusing or misleading names;
-use it with caution.
-.PP
-Please note that regardless of
-the regular expressions used to evaluate the username,
-it may be a maximum of 32 bytes;
-this may be less than 32 visual characters
-when using Unicode glyphs in the username.
.SS UID AND GID POOLS
Some installations desire that a non-system account
gets preconfigured properties when it is generated.
@@ -277,7 +246,7 @@ selection processes.
This is usually what you'd want.
With the \fBRESERVE_UID_POOL\fR and \fBRESERVE_GID_POOL\fR configuration
options, you can switch this behavior off if you want pooled UIDs and GIDs
-used by normal accounts.
+used by regular accounts.
This might cause conflicts and cause your pool UIDs and GIDs to be used
by accounts that are not in the pool.
=====================================
doc/adduser.local.8
=====================================
@@ -1,4 +1,4 @@
-.\" Copyright 2022 Marc Haber <mh+debian-packages at zugschlus.de>
+.\" Copyright 2025 Marc Haber <mh+debian-packages at zugschlus.de>
.\"
.\" This is free software; see the GNU General Public License version
.\" 2 or later for copying conditions. There is NO warranty.
=====================================
doc/deluser.8
=====================================
@@ -2,7 +2,7 @@
.\" 1995 Ted Hajek <tedhajek at boombox.micro.umn.edu>
.\" 1997-1999 Guy Maor
.\" 2000-2003 Roland Bauerschmidt <rb at debian.org>
-.\" 2004-2022 Marc Haber <mh+debian-packages at zugschlus.de>
+.\" 2004-2025 Marc Haber <mh+debian-packages at zugschlus.de>
.\" 2006-2009 Jörg Hoh <joerg at joerghoh.de>
.\" 2011 Justin B Rye <jbr at edlug.org.uk>
.\" 2016 Helge Kreutzmann <debian at helgefjell.de>
@@ -97,12 +97,13 @@ from the system according to command line options
and configuration information in
\fI/etc/deluser.conf\fP and \fI/etc/adduser.conf\fP.
.PP
-They are friendlier front ends to the
+They are more Debian specific front ends to the
\fBuserdel\fP and \fBgroupdel\fP programs,
-removing the home directory as option
+which are more distribution agnostic.
+\fBdeluser\fP and \fBdelgroup\fP can remove the home directory as option
or even all files on the system owned by the user to be removed,
-running a custom script,
-and other features.
+run a custom script,
+and have other features.
.PP
For a full list and explanations of all options,
see the OPTIONS section.
@@ -139,7 +140,7 @@ By default,
the backup archive is compressed with \fBgzip\fP(1).
To change this,
the \fB\-\-backup\-suffix\fP option can be set
-to any suffix supported by \fBtar \-\-auto\-compress\fP (e.g., .gz, .bz2, .xz).
+to any suffix supported by \fBtar \-\-auto\-compress\fP.
.PP
\fBdeluser\fP will refuse to remove the root account.
.PP
=====================================
doc/deluser.conf.5
=====================================
@@ -1,6 +1,6 @@
.\" Copyright: 1995 Ted Hajek <tedhajek at boombox.micro.umn.edu>
.\" 2000-2003 Roland Bauerschmidt <rb at debian.org>
-.\" 2004-2022 Marc Haber <mh+debian-packages at zugschlus.de>
+.\" 2004-2025 Marc Haber <mh+debian-packages at zugschlus.de>
.\" 2006-2007 Jörg Hoh <joerg at joerghoh.de>
.\" 2011 Stephen Gran <sgran at debian.org>
.\" 2016 Helge Kreutzmann <debian at helgefjell.de>
=====================================
testsuite/test9.pl
=====================================
@@ -95,7 +95,7 @@ if ($output !~ /^warn: The group `addusertest\d+' already exists as a system gro
}
print "ok\n";
-# now testing whether adding the group again (as a normal group)
+# now testing whether adding the group again (as a regular group)
# fails as it should
$cmd = "addgroup $sysgroupname";
View it on GitLab: https://salsa.debian.org/debian/adduser/-/compare/7bbb7604d72dcc51e201904a14b21983ef487034...ee63d4cc95beb867224fa1f0c0f5d08d9a6ed5b2
--
View it on GitLab: https://salsa.debian.org/debian/adduser/-/compare/7bbb7604d72dcc51e201904a14b21983ef487034...ee63d4cc95beb867224fa1f0c0f5d08d9a6ed5b2
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-shadow-devel/attachments/20250219/feba1a83/attachment-0001.htm>
More information about the Pkg-shadow-devel
mailing list