[Bug 1982523] Re: error in commented-out NAME_REGEX
Benjamin Drung
1982523 at bugs.launchpad.net
Mon Nov 28 14:14:05 UTC 2022
Fixed in Debian release 3.119:
https://salsa.debian.org/debian/adduser/-/commit/3982734b7cea35182b15b23945816ce42c001619
** Bug watch added: Debian Bug tracker #630750
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630750
** Also affects: adduser (Debian) via
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630750
Importance: Unknown
Status: Unknown
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to adduser in Ubuntu.
https://bugs.launchpad.net/bugs/1982523
Title:
error in commented-out NAME_REGEX
Status in adduser package in Ubuntu:
Confirmed
Status in adduser package in Debian:
Unknown
Bug description:
The default /etc/adduser.conf contains the line:
#NAME_REGEX="^[a-z][-.a-z0-9_]*\$"
Commenting this out in preparation of updating it does not work as
expected:
pra at PABELN-X1E:~$ grep NAME_REGEX /etc/adduser.conf; sudo adduser testuser
NAME_REGEX="^[a-z][-a-z0-9_]*\$"
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 at PABELN-X1E:~$
This is due to the overeager escaping of the dollar sign, which has
the undesired effect of requring that usernames end in `$`:
pra at PABELN-X1E:~$ sudo adduser testuser$
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 at PABELN-X1E:~$ grep NAME_REGEX /etc/adduser.conf; sudo adduser testuser
NAME_REGEX="^[a-z][-a-z0-9_]*$"
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.1-microsoft-standard-WSL2 x86_64
ApportVersion: 2.20.11-0ubuntu82.1
Architecture: amd64
CasperMD5CheckResult: unknown
Date: Thu Jul 21 19:56:02 2022
PackageArchitecture: all
ProcEnviron:
TERM=xterm-256color
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: adduser
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/adduser/+bug/1982523/+subscriptions
More information about the foundations-bugs
mailing list