--- Begin Message ---
- To: submit@bugs.debian.org
- Subject: adduser: confusing message regarding format of group names
- From: Vincent McIntyre <Vince.McIntyre@atnf.csiro.au>
- Date: Mon, 15 Dec 2008 08:48:50 +1100 (EST)
- Message-id: <alpine.DEB.1.10.0812150841020.18857@mayhem.atnf.CSIRO.AU>
Package: adduser
Version: 3.102
Severity: minor
*** Please type your report below this line ***
I tried to do this:
# adduser --group --system fu_bar
and got this result:
addgroup: Please enter a username matching the regular expression configured
via the NAME_REGEX configuration variable. Use the `--force-badname'
option to relax this check or reconfigure NAME_REGEX.
# echo $?
1
What this error message means, in translation, is
"I don't like underscores in group names".
However it takes quite a bit of looking at it to "get" this meaning.
Is there some way to make this meaning clearer to the reader?
I looked at the adduser manpage and NAME_REGEX is not mentioned.
Nor is it a variable that appears in /etc/adduser.conf.
So I was at a loss about what to do here, to do things "properly".
I was able to work around by using the suggestion in the message:
# adduser --group --system --force-badname fu_bar
That worked fine.
I went and read the code and became more confused.
The config hash has the element 'name_regex', not 'NAME_REGEX',
but this is a minor confusion.
I also found that in subroutine 'checkname', underscores should be
allowed in group names:
sub checkname {
my ($name) = @_;
if ($name !~ /^[_.A-Za-z0-9][-\@_.A-Za-z0-9]*\$?$/) {
printf STDERR
(gtx("%s: To avoid problems, the username should consist only of
letters, digits, underscores, periods, at signs and dashes, and not start with
a dash (as defined by IEEE Std 1003.1-2001). For compatibility with Samba
machine accounts \$ is also supported at the end of the username\n"), $0);
exit 1;
}
...
So it looks like, on my system, the NAME_REGEX variable is not being
defined?
I hacked the code to print all the keys & values in %config and found
that 'name_regex' was set to '^[a-z][-a-z0-9]*$'. I find where this
occurs.
I assume it should be defined in /etc/adduser.conf, is that correct?
If NAME_REGEX is defined, it appears to be inconsistent with the first
check in subroutine 'checkname' shown above.
When responding to this bug, could you please address:
1. this apparent inconsistency between the code and the default 'name_regex'?
2. mentioning NAME_REXEX in the manpage? I've attached a tentative patch.
Thanks,
Vince
-- System Information:
Debian Release: 4.0
APT prefers stable
APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.24-etchnhalf.1-686-bigmem
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Versions of packages adduser depends on:
ii debconf [debconf-2.0] 1.5.11etch2 Debian configuration management sy
ii passwd 1:4.0.18.1-7 change and administer password and
ii perl-base 5.8.8-7etch5 The Pathologically Eclectic Rubbis
adduser recommends no packages.
-- debconf information:
adduser/homedir-permission: true
--- adduser.8.orig 2008-12-15 08:16:13.000000000 +1100
+++ adduser.8 2008-12-15 08:30:54.000000000 +1100
@@ -195,11 +195,13 @@
.TP
.B \-\-force\-badname
By default, user and group names are checked against a configurable
-regular expression. This option forces
+regular expression (NAME_REGEX). This option forces
.B adduser
and
.B addgroup
-to apply only a weak check for validity of the name.
+to ignore this regular expression and apply only a weak check for validity
+of the name.
+The NAME_REGEX expression may be defined in the adduser.conf config file.
.TP
.B \-\-gecos GECOS
Set the gecos field for the new entry generated. adduser will not ask
--- End Message ---
--- Begin Message ---
Source: adduser
Source-Version: 3.115
We believe that the bug you reported is fixed in the latest version of
adduser, which is due to be installed in the Debian FTP archive.
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 508740@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Afif Elghraoui <afif@debian.org> (supplier of updated adduser package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Format: 1.8
Date: Sun, 26 Jun 2016 14:32:23 -0700
Source: adduser
Binary: adduser
Architecture: source
Version: 3.115
Distribution: unstable
Urgency: medium
Maintainer: Debian Adduser Developers <adduser-devel@lists.alioth.debian.org>
Changed-By: Afif Elghraoui <afif@debian.org>
Description:
adduser - add and remove users and groups
Closes: 508740 547911 611898 676356 685529 695997 697109 698483 712944 722583 756180 776203 811411 825610 825734 825770 825777 825778 825867 825876 825944 825973 826947 826965 827011 827012 827140
Changes:
adduser (3.115) unstable; urgency=medium
.
[ Afif Elghraoui ]
* Adopt package (Closes: #811411)
* Set Vcs-* fields to point to Git repository
* Bump Standards-Version to 3.9.8
* Extend last_{u,g}id to 59999 to match policy update from 3.9.0
(Closes: #776203)
* Note to work on the lintian error for debconf template.
* Fix path to rpcinfo, used for NIS support.
(Thanks to Nis Martensen for report and patch).
* Update Vietnamese translations (Closes: #825610)
Thanks to all translators for providing updates
.
[ Helge Kreutzmann ]
* Debconf:
* Update Turkish translation. Closes: #676356.
* Fix language field in Norwegian translation. Closes: #695997.
* Program (translation):
* Use "--previous" when generating the updated po files.
* Mention "--add_extra_groups" in --help output. Closes: #547911.
* Update Japanese translation. Closes: #697109.
* Update Czech translation. Closes: #825734.
* Update Slovak translation. Closes: #825770.
* Updated Danish translation. Closes: #825778.
* Update Portuguese translation. Closes: #825867.
* Update Russian translation. Closes: #825876.
* Update Japanese translation. Closes: #825973.
* Update Swedish translation. Closes: #826947.
* Update Brazilian Portuguese translation. Closes: #826965.
* Update Italian translation. Closes: #827011.
* Update French translation. Closes: #827140.
* Update Hungarian translation.
* Update Polish translation.
* Update Basque translation.
* Update Norwegian translation.
* Manpage:
* Improve pointer to customization files. Closes: #611898.
* Improve pointer to NAME_REGEX. Closes: #508740.
* Document --only-if-empty in delgroup.8. Closes: #722583.
* Format SEE ALSO section correctly in all man pages.
* Various formatting and minor language updates noted by the German
translator(s).
* Fixes in the German translation. Closes: #685529, #698483.
* Update Portuguese translation. Closes: #756180, #825867.
* Update Danish translation. Closes: #825777.
* Update Russian translation. Closes: #825944.
* Update Italian translation. Closes: #827012.
* Update Polish translation.
* Update French translation.
* Update German translation.
* Update example from John Zaitseff <J.Zaitseff@zap.org.au> to version 4.9.
Thanks. Closes: #712944.
* Fix issues found by i18nspector.
* Add correct pot file
* Trivial unfuzzy
* Fix various errors found by translators (and unfuzzy translations)
* Fix build error
Checksums-Sha1:
8b9052077e08c6e1e05d50118f1e0384a04aa314 1701 adduser_3.115.dsc
0920f9be0fd6576242fb8a2515b497768cb29024 213620 adduser_3.115.tar.xz
Checksums-Sha256:
754698aa19d7521080ecacc8033baa20cfa4a963021de6061c68ffa6ee15e9a1 1701 adduser_3.115.dsc
e7288281d4d1eec2948ba3687452ca33a8224d40c98d321bc3fbaefcf6d4c0db 213620 adduser_3.115.tar.xz
Files:
3c8bad387f5aa9abdf22d0df9b89a0c6 1701 admin important adduser_3.115.dsc
6bb6d93922d281f1b56393a53f8ce5fd 213620 admin important adduser_3.115.tar.xz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBCAAGBQJXcEsVAAoJEFmyMG86+d3BNboP+wQdkxXgMowgT+eZw0vcr1iN
4iBuLi48v5iKx7fxMbPt4qCZiDC+w4DRKcuNgkQ2Z71b98PvRfCfq9ruD2TqsbnJ
P0r3d8c6Cw55zEOMmPx4vZMRdS9PDH5sjiXnwCvCP/mtkx0H2ZG7ruZ0OlAuv+EK
4yM70auwwF3hELed+dPW+2qwvt2uI3wx4IT/qQ0Tu2Y7CSDkkuvE/DGjjDWALE20
t6Rb9F0D5CIdjbtvd5bvP4A+dosp1ICeyqg11wbY6wjomtDFf60DIVxaOnHkv3Bv
gdeMFSLMkqmQKiDwo7tOTi354+BUAMcEzkrXm7jk9syZZH23G2pLp8rv1Ebn704r
N8wo9RnEiGCokF+0HXbdBPChCEDF1LVvTB8xzyQ3s/b0l+HV5oZL1gpS3ueUtklh
Tg381zFfNUYAEvu777A3+H4QB3mSNCVVvOGrZmzPBmMMasQ5PaVATSkVMSO4VdIq
akws46lf+j/WcJ7fWl9UUTlW8WFv5tHRpmIHg4Qr2berqXLHbhOMs+JGTpVk2PQZ
3g/pbcY7yUMv3Ksn/u0TCivtBbqMQwHL2AkWfaluahD1cei4Npg22W4Rs7HPBdmZ
fj+JqNpTMPO3eb+dcRU73GkHYq8lScPCtr2FrPQPf5wcKN9t6HmlI/B7/v5z5oBd
+MZ75MBgCwTdLvvOQZ9e
=F4Ye
-----END PGP SIGNATURE-----
--- End Message ---