Bug 139262 - useradd does not allow "dot" or "at" in usernames
Summary: useradd does not allow "dot" or "at" in usernames
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: shadow-utils (Show other bugs)
(Show other bugs)
Version: 3
Hardware: All Linux
medium
medium
Target Milestone: ---
Assignee: Eido Inoue
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-11-14 17:03 UTC by shrek-m
Modified: 2018-05-04 17:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-11-15 20:04:08 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description shrek-m 2004-11-14 17:03:27 UTC
Description of problem:
useradd does not allow "dot""." or "at""@" in usernames

Version-Release number of selected component (if applicable):
shadow-utils-4.0.3-38

How reproducible:
Always

Steps to Reproduce:
1. try to add new users with "." or "@"

Actual Results:
# LANG=C useradd test.test
useradd: invalid user name 'test.test'

# LANG=C useradd test@test
useradd: invalid user name 'test@test'

# LANG=C useradd testtest
#

Expected Results:  should be possible without editing /etc/passwd
/etc/group /etc/shadow

# grep test.test /etc/passwd /etc/group /etc/shadow | awk -F: '{print
$1 "\t" $2 }'
/etc/passwd     test.test
/etc/group      test.test
/etc/shadow     test.test

Additional info:
<=rhl 7.3 it is possible
afair "." is not possible since rhl8.0, rhl9, fc1, fc2, fc3


info for cyrus-imapd
--man imapd.conf--
unixhierarchysep: 0
Use the UNIX separator character  �/�  for  delimiting  levels  of
mailbox  hierarchy.   The  default is to use the netnews separator
character �.�
----

you have to change it to "1" for enabling dot-users - local_accounts
cyradm
> cm user/test.test

Comment 1 Leonid Mamtchenkov 2004-11-15 14:35:20 UTC
I don't have a problem with dot "." in usernames.  The version of
shadow-utils is shadow-utils-4.0.3-40 though.  at "@" doesn't work for
me either, but than I am not so sure it should.

Comment 2 shrek-m 2004-11-15 19:48:17 UTC
# rpm -q shadow-utils
shadow-utils-4.0.3-40
# useradd other.test

"." is ok now

for "@" i agree.
it was possible in rhl 7.3 (and other unbelievable combinations)
but i am not sure if it should really work.

if "@" is not ok in usernames ( shrek-m@gmx.de@gmx.net ) than this bug
can be closed.

thanks

Comment 3 Eido Inoue 2004-11-15 20:04:08 UTC
as per release 38 changelog, "@" is not ok in usernames:

- conform to posix for user/group name input checking [def 3.426
  and 3.189] which is posix portable filename character set [3.276]
  while disallowing dash for first char as recommended, and disallow
  dollar sign)

only "[A-Za-z0-9._][A-Za-z0-9._-]*" is allowed (with a special
exception made for samba machine names, by option, in release 41 and
above)

Comment 4 Pablo Rodriguez 2018-05-04 17:27:51 UTC
On IEEE Std 1003.1-2017 standard available at https://ieeexplore.ieee.org/document/8277153/

And also on IEEE Std 1003.1-2001 available at http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap06.html#tag_06_01

You should use the 6.1 Portable Character Set that includes some special characters (see section 3.426 User Name)


Note You need to log in before you can comment on or make changes to this bug.