'useradd: invalid user name' error message in Red Hat Enterprise Linux?
Issue
- Not able to add new local user who has '@' sign as part of username. It throws error as "invalid user name". For example username as:
$ sudo useradd testuser@example.com
useradd: invalid user name 'testuser@example.com'
Environment
- Red Hat Enterprise Linux (RHEL)
- 5.x
- 6.x
- 7.x
- 8.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.