Bug 129480 - Unable to handle '.' or any other punctuation in usernames
Unable to handle '.' or any other punctuation in usernames
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: shadow-utils (Show other bugs)
2
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Eido Inoue
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-08-09 12:09 EDT by Mike Hawkstarrr
Modified: 2007-11-30 17:10 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-09-23 15:12:45 EDT
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 Mike Hawkstarrr 2004-08-09 12:09:34 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET 
CLR 1.1.4322)

Description of problem:
I have seen this problem before in other distributions (RedHat 9.0), 
but fix doesn't seem to work for Fedora 2. The useradd function won't 
allow a '.' in usernames. Such as user.name. Most of my pop3 email 
address use the format firstname.lastname, so this is quite a problem 
for me. Someone please help.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.useradd user.name <ENTER>
2.
3.
    

Actual Results:  invalid user 'user.name'

Additional info:
Comment 1 B.R. 2004-09-04 05:27:33 EDT
Please help me to understand why this bug still persists ...  How 
many bug reports will be filed before it is wiped out?

bug 80462 ... bug 88358 ... bug 88877 ... bug 89205 ... bug 
104179 ... bug 108614 ... bug 115539 ... and now bug 129480

Patches have already been submitted as well.  One line changed in 
libmisc/chkname.c from the shadow-utils package fixes it, and yet it 
has persisted since 2002-12-26.

*name == '_' || *name == '-' || *name == '.' ||

Is there some reason this is being left uncorrected even though it 
has been marked as RESOLVED in bugzilla?  I'd certainly enjoy not 
having to manually patch it in future releases.
Comment 2 Mike Hawkstarrr 2004-09-07 13:15:47 EDT
I have seen this file that is supposed to be a patch. However, what 
is the path to the file that needs to be patched. I have run 
searches, found the shadow-utils directory and I still for some 
reason can't fine this libmisc/chkname.c file that is supposed to be 
patched. Could you please give me the path to this file for FC 2?
Comment 3 B.R. 2004-09-09 03:30:08 EDT
The trick is to install the source rpm (SRPM) for shadow-utils first;
then you will be able to find the chkname.c file and edit it. 
Assuming the development environment is already in place, the process
I follow goes like this:

rpm -ivh shadow-utils-4.0.3-21.src.rpm

cd /usr/src/redhat/SOURCES/
bunzip2 shadow-4.0.3.tar.bz2
tar -xvf shadow-4.0.3.tar
cd shadow-4.0.3/libmisc/

vi chkname.c

// USE VI TO EDIT THE SOURCE CODE, SAVE CHANGES, AND EXIT.

cd ../..
tar -cvf shadow-4.0.3.tar shadow-4.0.3/
bzip2 shadow-4.0.3.tar
rm -rf shadow-4.0.3

cd ../SPECS/
rpmbuild -bb shadow-utils.spec

cd ../RPMS/i386
rpm -Uvh --force shadow-utils-4.0.3-21.i386.rpm

There's probably a quicker method to it, but this works for me and is
relatively easy to follow.  It sure would be nice if it wasn't
necessary at all, however ...

Also, note that since Fedora Core 2 (maybe Core 1?) it is necessary to
have libtool and libselinux-devel installed as well before rebuilding
the shadow-utils RPM.

Hope this helps!
Comment 4 Mike Hawkstarrr 2004-09-15 16:07:52 EDT
That worked great! Thanks a lot! Only thing, and if this can't be 
changed, it's cool, but the gui interface for adding/editing users 
still doesn't let punctuation in. I can do it via useradd, but is 
there any way to make it work system wide?
Comment 5 B.R. 2004-09-16 04:16:59 EDT
Glad that helped you out :-)  It's a simple enough fix -- simple
enough to make me wonder why it hasn't been rolled into a release for
almost two years now.  We'll probably never know why it was broken
(and then not immediately fixed) in the first place.  I don't use the
graphical tools myself, so I can't help you there.  I'm a little
surprised though that the graphical tool wouldn't use the same
"good_name" function from the shadow tools.  My gut says it should and
that you might have a whole new bug report there.  Good luck to you!
Comment 6 Eido Inoue 2004-09-23 15:12:45 EDT
"." will be allowed (as well as mixed case).

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