Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 22920 - impossible to create account with period in login name
Summary: impossible to create account with period in login name
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
: 37402 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-06-16 05:04 UTC by Hubert Mercier (RETIRED)
Modified: 2017-10-18 20:50 UTC (History)
3 users (show)

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


Attachments
Patch to allow user to create a username with a "." (shadow-4.0.3-chkname.patch,815 bytes, patch)
2003-06-16 18:28 UTC, Chuck Short (RETIRED)
Details | Diff
Patch to add my patch to shadow-4.0.3-r6 (shadow-4.0.3-r6.ebuild.fix,525 bytes, patch)
2003-06-16 18:29 UTC, Chuck Short (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hubert Mercier (RETIRED) gentoo-dev 2003-06-16 05:04:22 UTC
I need to create accounts whose usernames contain periods (example : 
firstname.name).

adduser firstname.name tells me : adduser: invalid user name 'firstname.name'
and so does useradd.
Creating an account using the '-' character works, an i can change it 'by 
hand' in the password file. But not easy to script, and sounds dangerous :-P

As i need scripting accounts creation i can't use interactive tools such as 
superadduser.

Note : on debian, the same problem occurs with adduser, but not with useradd !!
And on Mandrake, no problem at all, the 2 commands accept periods...

Reproducible: Always
Steps to Reproduce:
1. adduser firstname.name
2. useradd firstname.name

Actual Results:  
invalid user name 'firstname.name'

And the system refuses to create the account

Expected Results:  
It should have created the account.
Comment 1 Chuck Short (RETIRED) gentoo-dev 2003-06-16 18:28:34 UTC
Created attachment 13393 [details, diff]
Patch to allow user to create a username with a "."

Patch allows users to create a username with a ".".
Comment 2 Chuck Short (RETIRED) gentoo-dev 2003-06-16 18:29:49 UTC
Created attachment 13394 [details, diff]
Patch to add my patch to shadow-4.0.3-r6

This adds an extra two lines to the ebuild so that the
shadow-4.0.3-chkname.patch to be used.
Comment 3 Chuck Short (RETIRED) gentoo-dev 2003-06-16 18:31:35 UTC
Hi,


I have verified that you cant add username with a period in it. I get a invalid username error message.

This patch allows the username to have a period. I have tested with bot adduser and useradd. It worked fine when using adduser and useradd.

chuck
Comment 4 Hubert Mercier (RETIRED) gentoo-dev 2003-06-17 02:27:28 UTC
OK, works for me too.

But i don't know how to change the bug status to 'solved' (i read the patch, i see no reason to test anymore ;-).

Will it be incorporated to next version of shadow ? I hope so ;-)

Thanks again !

Comment 5 Ivan Havlicek 2004-07-16 09:22:23 UTC
I emerge a new version today (sys-apps/shadow-4.0.4.1-r3) and the bug is still there !
Comment 6 phceac 2004-08-11 14:29:28 UTC
This looks like Bug 37402 - see discussion there.
Comment 7 Hubert Mercier (RETIRED) gentoo-dev 2004-09-21 09:11:51 UTC
Well, i am still annoyed with this problem, so i was wondering if the patch would be one day incorporated to the gentoo package ?

This is really boring to have to patch every new server I install...

(I now use Gentoo in a professional way, to host several hundreds of users; some of them have the same name, so using firstname.lastname as a login is usefull for me.)

Thanks in advance :)
Comment 8 SpanKY gentoo-dev 2004-09-21 10:51:11 UTC
*** Bug 37402 has been marked as a duplicate of this bug. ***
Comment 9 SpanKY gentoo-dev 2004-09-21 10:54:57 UTC
i'll make you a deal ... update the patch to fail if the _POSIX2_VERSION env var is set to a date less than some target date (i'll find the target date in a bit, it doesnt matter ...) and i'll add the patch to our shadow

the only real concern i have is with coreutils' chown ... it checks the _POSIX2_VERSION env var to see if the '.' is a separator
Comment 10 Hubert Mercier (RETIRED) gentoo-dev 2004-09-21 11:41:39 UTC
My english isn't perfect, but I think I understood the problem. In fact, I didn't matter about the chown problem since I never used this syntax (always used ":" as separator).

So, the problem is to check the _POSIX2_VERSION, to see if it is posterior to a date of your choice, in order to "disable" the old syntax in chown ? Yes / No ? ^^

Sorry, but I told you in the beginning : english not perfect :( .
Comment 11 SpanKY gentoo-dev 2004-09-21 15:20:30 UTC
ah forget about it

i'll get seemant to remove the '.' compatibility of coreutils and we'll have the newer shadow DEPEND on it
Comment 12 SpanKY gentoo-dev 2005-01-09 22:34:39 UTC
ok, ive added '.' support to shadow-4.0.6 (no version bump)
Comment 13 Hubert Mercier (RETIRED) gentoo-dev 2005-01-10 01:43:25 UTC
Thanks a lot, I thought this bug was left back ;-) !