error in commented-out NAME_REGEX
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
adduser (Debian) |
Fix Released
|
Unknown
|
|||
adduser (Ubuntu) |
Fix Released
|
Low
|
Unassigned |
Bug Description
The default /etc/adduser.conf contains the line:
#NAME_
Commenting this out in preparation of updating it does not work as expected:
pra@
NAME_
adduser: Please enter a username matching the regular expression configured
via the NAME_REGEX[_SYSTEM] configuration variable. Use the `--force-badname'
option to relax this check or reconfigure NAME_REGEX.
pra@
This is due to the overeager escaping of the dollar sign, which has the undesired effect of requring that usernames end in `$`:
pra@
Adding user `testuser$' ...
Adding new group `testuser$' (1002) ...
Adding new user `testuser$' (1002) with group `testuser$' ...
Creating home directory `/home/testuser$' ...
Copying files from `/etc/skel' ...
New password:
Removing the backslash escaping the terminal `$` corrects the issue:
pra@
NAME_
Adding user `testuser' ...
Adding new group `testuser' (1002) ...
Adding new user `testuser' (1002) with group `testuser' ...
Creating home directory `/home/testuser' ...
Copying files from `/etc/skel' ...
New password:
I reported this for the `adduser` package because it seemed the closest match. The file /etc/adduser.conf is not owned by any package.
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: adduser 3.118ubuntu5
Uname: Linux 5.10.102.
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckR
Date: Thu Jul 21 19:56:02 2022
PackageArchitec
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: adduser
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in adduser (Debian): | |
status: | Unknown → Fix Released |
Status changed to 'Confirmed' because the bug affects multiple users.