You are not logged in.

#1 2009-04-15 09:43:26

stefan1975
Member
From: 53 6e 65 65 6b
Registered: 2007-04-16
Posts: 195

add users with "." (dots) in the user names

Hi,

i just switched my server from fedora to Arch and found that I cannot recreate the users the way they were. On Fedora I had created users like so:

{firstname}.{lastname}

however Arch for some reason will not let met create usernames with dots "."  in them. Any reason for this, and can this be changed?

thx,
stefan


"root# su - bofh"
OS: F10_x64, Arch, Centos5.3, RHEL4.7, RHEL5.3
Desktop Hardware: Dell Precision M65 laptop, core2duo, 2gb, 80gb 7200rpm
Registered linux user #459910 since 1998

Offline

#2 2009-04-15 10:33:28

Shodan
Member
From: Finland
Registered: 2008-08-25
Posts: 30

Re: add users with "." (dots) in the user names

man useradd:

Usernames must begin with a lower case letter or an underscore, and only lower case letters, 
underscores, dashes, and dollar signs may follow. 
In regular expression terms: [a-z_][a-z0-9_-]*[$]

Offline

#3 2009-04-15 10:49:20

stefan1975
Member
From: 53 6e 65 65 6b
Registered: 2007-04-16
Posts: 195

Re: add users with "." (dots) in the user names

yes, i knew already that it doesn't work and why. The fact that it does not accept the "dots" is obvious.

What i want to know is how to work around this and why this would differ in "useradd" from rhel/centos/fedora to Arch. On all windows servers and rhel-family servers we use {firstname}.{lastname} without issues and it would suck if users have to remember a different loginname for this one computer (besides it sucks when you have to use {username}@archserver when using ssh).

fedora:

[root@galactica ~]# grep stefan /etc/passwd
stefan.van.ramen:x:500:500:stefan:/home/stefan.van.ruiten:/bin/bash

stefan


"root# su - bofh"
OS: F10_x64, Arch, Centos5.3, RHEL4.7, RHEL5.3
Desktop Hardware: Dell Precision M65 laptop, core2duo, 2gb, 80gb 7200rpm
Registered linux user #459910 since 1998

Offline

#4 2009-04-15 11:12:02

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: add users with "." (dots) in the user names

I don't know. It's not a good idea in any case -- if traditional Unix accounts can't contain periods, I wouldn't do it even if one distro lets you. I'm guessing you used graphical tools in those distros that created the accounts, then, and those graphical tools don't use useradd as the backend.

Offline

#5 2009-04-15 11:23:11

stefan1975
Member
From: 53 6e 65 65 6b
Registered: 2007-04-16
Posts: 195

Re: add users with "." (dots) in the user names

Ranguvar wrote:

I don't know. It's not a good idea in any case -- if traditional Unix accounts can't contain periods, I wouldn't do it even if one distro lets you. I'm guessing you used graphical tools in those distros that created the accounts, then, and those graphical tools don't use useradd as the backend.

graphical tools? what are those? of course I only use the cli :-) All those acccounts (160+) have been created using plain old "useradd".

stefan


"root# su - bofh"
OS: F10_x64, Arch, Centos5.3, RHEL4.7, RHEL5.3
Desktop Hardware: Dell Precision M65 laptop, core2duo, 2gb, 80gb 7200rpm
Registered linux user #459910 since 1998

Offline

#6 2009-04-15 11:47:27

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: add users with "." (dots) in the user names

Fedora must have patched it then, for whatever reason. Maybe you could do the same, and create your own patched shadow package.

Offline

#7 2009-04-15 12:09:37

Nezmer
Member
Registered: 2008-10-24
Posts: 559
Website

Re: add users with "." (dots) in the user names

Fedora must have patched it then

Indeed .
http://cvs.fedoraproject.org/viewvc/rpm … iew=markup

Last edited by Nezmer (2009-04-15 12:11:12)


English is not my native language .

Offline

#8 2009-04-16 01:40:31

Xiong Chiamiov
Member
From: central coast, california
Registered: 2008-06-18
Posts: 142
Website

Re: add users with "." (dots) in the user names

Nezmer wrote:

Fedora must have patched it then

Indeed .
http://cvs.fedoraproject.org/viewvc/rpm … iew=markup

Because "improving" packages via monkey-patch is always a good idea.

Offline

Board footer

Powered by FluxBB