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
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.
# 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.net ) than this bug can be closed. thanks
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)
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)