Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 90713 - useradd does not allow creation of account with name beginning with a digit.
Summary: useradd does not allow creation of account with name beginning with a digit.
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-28 07:08 UTC by Hubert Mercier (RETIRED)
Modified: 2005-04-28 16:22 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hubert Mercier (RETIRED) gentoo-dev 2005-04-28 07:08:12 UTC
I was trying to create an temporary account for users in a conference. The conference name begins with a digit (I don't give it here, for security reasons). 

So i tried to create a user account whose name begins with a digit : not allowed : adduser: invalid user name '3xxxxx'. Just a cosmetic problem in fact, but strange, no ?

Workaround is very easy : just choose another login name ;-)

Reproducible: Always
Steps to Reproduce:
1. useradd -g users -d /home/9user -m 9user
2. 
3.

Actual Results:  
Error message : adduser: invalid user name '9user'

Expected Results:  
It should have created the account properly.

Portage 2.0.51.19 (default-linux/x86/2005.0/2.4, gcc-3.3.5,
glibc-2.3.4.20041102-r1, 2.4.27 i686)
=================================================================
System uname: 2.4.27 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.4.16
Python:              dev-lang/python-2.3.4-r1 [2.3.4 (#1, Apr  4 2005, 17:52:46)]
distcc 2.16 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [enabled]
dev-lang/python:     2.3.4-r1
sys-devel/autoconf:  2.13, 2.59-r6
sys-devel/automake:  1.5, 1.8.5-r3, 1.6.3, 1.7.9-r1, 1.4_p6, 1.9.4
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config
/usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distcc distlocks sandbox sfperms strict"
GENTOO_MIRRORS="http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/
http://gentoo.mirror.sdv.fr"
MAKEOPTS=" -j7"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X apm arts avi berkdb bitmap-fonts crypt cups curl divx4linux doc
emboss encode fam foomaticdb fortran gdbm gif gpm gtk2 imagemagick imlib jpeg
kde ldap libg++ libwww mad mikmod mmx motif mp3 mpeg ncurses nls ogg oggvorbis
opengl oss pam pdflib perl png python qt quicktime readline real samba sdl slang
spell sse sse2 ssl svga tcpd tiff truetype truetype-fonts type1-fonts vorbis
xml2 xmms xv xvid zlib"
Unset:  ASFLAGS, CBUILD, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTDIR_OVERLAY
Comment 1 SpanKY gentoo-dev 2005-04-28 16:22:12 UTC
manpage covers this:
RESTRICTS
       Currently,  the  shadow  suite  enforces  the following restrictions on
       user names:

       - must begin with a lower case letter or underscore
       - can only contain lower case letters, underscores, and dashes
       - may end with a dollar sign
       - regex for these requirements: [a-z_][a-z0-9_-$]*