[Adduser-devel] Bug#283110: adduser won't add usernames containing dots

Michelle Konzack Michelle Konzack <linux4michelle@freenet.de>, 283110@bugs.debian.org
Fri, 26 Nov 2004 17:43:59 +0100


--Xsn3knLL3qrmRbVI
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Am 2004-11-26 16:11:22, schrieb Jes=FAs M. Navarro:

> Still, useradd will gladly add these kind of usernames.  For all I=20
> know,
> usernames containing dots used to be POSIX illegal, but they are=20
> illegal no
> more.  chmod, for instance, will allow `chmod user:group whatever`
> syntax (using colon instead of dot-separating old notation) just for=20
> this very reason.

Are you sure ?
It works since POTATO...

> Since this bug impedes adding a legal (so I think) username, I think=20
> this
> deserves the "important" level.

I have changed it since the first WOODY Release...

File: adduser

Change the two things from
------------------------------------------------------------------------
$verbose =3D 1;			# should we be verbose?
$allow_badname =3D 0;		# should we allow bad names?
$ask_passwd =3D 1;		# ask for a passwd?

=2E..

# is name ok?
sub checkname {
    my ($name) =3D @_;
    if ($allow_badname && $name !~ /^[A-Za-z_][-_A-Za-z0-9]*\$?$/) {
------------------------------------------------------------------------

to
------------------------------------------------------------------------
$verbose =3D 1;			# should we be verbose?
$allow_badname =3D 1;		# should we allow bad names?
$ask_passwd =3D 1;		# ask for a passwd?

=2E..

# is name ok?
sub checkname {
    my ($name) =3D @_;
    if ($allow_badname && $name !~ /^[A-Za-z_][-_.A-Za-z0-9]*\$?$/) {
------------------------------------------------------------------------
                                                 ^
                            There is a added point

Greetings
Michelle

--=20
Linux-User #280138 with the Linux Counter, http://counter.li.org/=20
Michelle Konzack   Apt. 917                  ICQ #328449886
                   50, rue de Soultz         MSM LinuxMichi
0033/3/88452356    67100 Strasbourg/France   IRC #Debian (irc.icq.com)

--Xsn3knLL3qrmRbVI
Content-Type: application/pgp-signature; name="signature.pgp"
Content-Description: Digital signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)

iD8DBQFBp11PC0FPBMSS+BIRAk4IAJ47VvxwQ0/0UGUEM3ySrATh085CjQCeMPrl
pKF+4a4xAQ8JSoBgzZ4EWqo=
=a8Hd
-----END PGP SIGNATURE-----

--Xsn3knLL3qrmRbVI--