Red Hat Bugzilla – Bug 88358
useradd not functioning correctly with periods
Last modified: 2007-04-18 12:52:53 EDT
Description of problem:
Unable to use periods in username in adduser, reports invalid username
Many programs that automate adding (such as VHost software) use the period
to enable vurtual ftp access.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. login as root
2. try adduser john.smith (as an example)
[root@sprint ~]# useradd john.smith
useradd: invalid user name 'john.smith'
To accept firstname.lastname like previous versions of RH
UNIX login names have never (as far as I can recall) allowed periods. They are
of the form [a-z][0-9a-z]* to a maximum of 8 characters (just checked -
apparently the length limit has changed - pwck is happy with 1-32 char names).
Allowing periods would break the chown command as it treats a username of
red.hat as user red and group hat.
The real bug is that none of the man pages for useradd(8), pwck(1) or passwd(5)
tell you what characters are valid - passwd(5) just mentions that it "should
not contain capital letters". If you manage to get a username with a period in
the passwd file, the pwck command simply reports "invalid username 'red.hat'"
without explaining what is wrong with it.
Furthermore, in section "184.108.40.206 Naming Conventions" of the "Red Hat Linux 9
Red Hat Linux System Administration Primer" the following are provided as
Department code followed by user's last name (029smith, 454jones, 191brown,
None of these are valid according to pwck.
Bug #88877 is a duplicate of this bug.
Yes thats true with periods however as Red Hat have for past versions allowed
it, I was hopeing to get an official word on whether they intend for compliancy
with 9 and future releases to adhere to this and deny the period.
This will have a major affect on some of the virtual hosting packages out there
which offer a period or underscore when useing system password file, I can have
the one I use changed away from period as I'm contact with its author over this
issue, you are correct in as much as changeing the group, I never needed to try
that before as all users on those boxes are fixed to 1 group, however trying to
change something to it does break even when used red.hat:newgroup, just I
couldn't find any mention on teh release for 9 saying this is to be
discontinued. I notice the duplicate after I submitted this one, the keyworks I
tried were different on initial search, I also notice RedHat have not commented
to that one either which is some 4 months old.
How about for us on legacy networks? The company I work for has a domain schema
of firstname.lastname for logins. We already have tons (150+) in use and aren't
about to change our entire schema. Our fileservers were running redhat 6.2 and
allowed creation of usernames with periods in them just fine...now that we
upgraded to redhat 9 suddenly we can't add users to the fileservers without
removing the ., then manually editing it into the passwd and shadow files, which
is a horrible way of doing things. It's ridiculous to not allow some sort of
override switch for those of us that still *need* periods in our usernames.
The bug #89205 has solution for this problem (a working patch).
*** This bug has been marked as a duplicate of 89205 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.