Remco Barendse
2005-Dec-30 11:48 UTC
[CentOS] Why are dots in username & groupname no longer allowed?
For some strange reason I am no longer able to create groupnames or usernames (with useradd and groupadd) that contain a dot. Uptill now it was possible to create user&groupnames like c.smith but now I get these errors: [root at server etc]# useradd c.smith useradd: invalid user name 'c.smith' [root at server1 etc]# groupadd c.smith groupadd: c.smith is a not a valid group name Anything without a dot works without problems. The box is a (fully updated) CentOS 3.6 x86_64 box with Dual Opteron cpu. Thanks for any hints!
Rodrigo Barbosa
2005-Dec-30 12:26 UTC
[CentOS] Why are dots in username & groupname no longer allowed?
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Fri, Dec 30, 2005 at 12:48:18PM +0100, Remco Barendse wrote:> For some strange reason I am no longer able to create groupnames or > usernames (with useradd and groupadd) that contain a dot. > > Uptill now it was possible to create user&groupnames like c.smith but now > I get these errors: > > [root at server etc]# useradd c.smith > useradd: invalid user name 'c.smith' > > [root at server1 etc]# groupadd c.smith > groupadd: c.smith is a not a valid group name > > Anything without a dot works without problems. > > The box is a (fully updated) CentOS 3.6 x86_64 box with Dual Opteron cpu.As far as I know, dots where never supposed to be valid characters for Unix usernames. The historical reasons are many, including the syntax of some commands that take username as a parameter. Several commands will that username.group as a parameter and, as you can see, the dot can get in the way of that. So, if you ask me, the upstream provider just corrected a long standing compatibility issue. In any case, if you really want to have usernames with dots on it, you can create them manualy, or create them without the dot, and then change them by editing the apropriate files. Best Regards, - -- Rodrigo Barbosa <rodrigob at suespammers.org> "Quid quid Latine dictum sit, altum viditur" "Be excellent to each other ..." - Bill & Ted (Wyld Stallyns) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (GNU/Linux) iD8DBQFDtSeEpdyWzQ5b5ckRAjusAKCn/y24umoJXFdmTap0i3V5rVlJqACdF3VE nAkBfHHQvUiqsJh5A1y5c/U=sxRR -----END PGP SIGNATURE-----
Benjamin Smith
2006-Jan-05 18:25 UTC
[CentOS] Why are dots in username & groupname no longer allowed?
Try this one: chown -R c.smith.users /home/c.smith See the problem? -Ben On Friday 30 December 2005 03:48, Remco Barendse wrote:> For some strange reason I am no longer able to create groupnames or > usernames (with useradd and groupadd) that contain a dot.-- "The best way to predict the future is to invent it." - XEROX PARC slogan, circa 1978