Bug 88358 - useradd not functioning correctly with periods
useradd not functioning correctly with periods
Status: CLOSED DUPLICATE of bug 89205
Product: Red Hat Linux
Classification: Retired
Component: shadow-utils (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Nalin Dahyabhai
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-04-09 08:39 EDT by Noel
Modified: 2007-04-18 12:52 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-02-21 13:52:34 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Noel 2003-04-09 08:39:02 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):


How reproducible:
useradd firstname.lastname

Steps to Reproduce:
1. login as root
2. try adduser john.smith (as an example)
3.
    
Actual results:

[root@sprint ~]# useradd john.smith
useradd: invalid user name 'john.smith'

Expected results:
To accept firstname.lastname like previous versions of RH


Additional info:
Comment 1 David Wilson 2003-04-22 22:32:12 EDT
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 "6.1.1.1 Naming Conventions" of the "Red Hat Linux 9
Red Hat Linux System Administration Primer" the following are provided as 
suggested usernames:

Department code followed by user's last name (029smith, 454jones, 191brown, 
etc.)

None of these are valid according to pwck.

Bug #88877 is a duplicate of this bug.
Comment 2 Noel 2003-04-23 00:10:21 EDT
David,
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.
Comment 3 Michael Vonderbecke 2003-09-08 11:43:28 EDT
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.
Comment 4 Milan Kerslager 2003-10-22 23:56:58 EDT
The bug #89205 has solution for this problem (a working patch).

*** This bug has been marked as a duplicate of 89205 ***
Comment 5 Red Hat Bugzilla 2006-02-21 13:52:34 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.