Description of problem: The useradd command should reject pure numerical usernames - otherwise it is difficult in some commands to differentiate bewtween alphanumerical usernames and numerical userids. Version-Release number of selected component (if applicable): shadow-utils-4.1.4.2-8.fc14.i686 How reproducible: always Steps to Reproduce: 1. useradd 123456789 2. 3. Actual results: is not rejected Expected results: should be rejected Additional info:
Example: Changing the ownership of some file afterwards can lead to a misunderstanding, if there a are different users with the same username resp. userid (user #1: username=12345,userid=500; user #2: username=aaaa,userid=12345). chown 12345 /tmp/xxxxx. Which user is meant? 12345 or aaaa?
yes I agree with you Joachim. This might lead to a misunderstanding if admin creates pure numerical usernames. shadow-utils upstream version allows names that match [a-z_][a-z0-9_-]*[$] too. But I must say I'm not very open to idea of changing current behaviour. * We have been using pattern [a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]? for a long time and I don't want to make other people unhappy. * the intention is to follow posix as much as possible http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_426 http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_276 * we are not the only one who allow numerical usernames, see FreeBSD I'm closing this bz report as NOTABUG now. If you think that useradd behaviour should be changed, please start a public discussion about this issue.