Bug 129480 - Unable to handle '.' or any other punctuation in usernames
Summary: Unable to handle '.' or any other punctuation in usernames
Alias: None
Product: Fedora
Classification: Fedora
Component: shadow-utils (Show other bugs)
(Show other bugs)
Version: 2
Hardware: i686 Linux
Target Milestone: ---
Assignee: Eido Inoue
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2004-08-09 16:09 UTC by Mike Hawkstarrr
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-09-23 19:12:45 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Mike Hawkstarrr 2004-08-09 16:09:34 UTC
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:

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

Actual Results:  invalid user 'user.name'

Additional info:

Comment 1 B.R. 2004-09-04 09:27:33 UTC
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 17:15:47 UTC
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 07:30:08 UTC
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


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 20:07:52 UTC
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 08:16:59 UTC
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 19:12:45 UTC
"." 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.