I want to create Unicode logins for *Unix flavor OS, when i use useradd like below, I got that user name is invalid

[root@mail ~]# useradd ياسين
useradd: invalid user name 'ياسين
  • Related: unix.stackexchange.com/questions/340108/…
    – user147505
    Oct 11, 2019 at 21:12
  • Linux is one of the unix flavors and I could not add unix as a tag , that is why i use linux Oct 11, 2019 at 22:11
  • Deleted to avoid any confusions Oct 11, 2019 at 22:12
  • It works for me on debian 10 (buster). If you're using some ancient system, you could only use ascii, of course.
    – user313992
    Oct 12, 2019 at 9:25
  • 2
    Please mention the exact name and versions of the systems you're using. You may also try simply useradd -m yaseen and then edit the user name back to 'ياسين' inside /etc/passwd with vipw (just tried it centos7 -- where useradd rejects any non-ascii lowercase usernames). ssh, su, passwd should have no trouble dealing with the username afterwards.
    – user313992
    Oct 13, 2019 at 7:33

1 Answer 1


Check your systems documentation on what usernames are allowed. Eg.:

man useradd

On my Debian 10 in the section CAVEATS there I read this:

It is usually recommended to only use usernames that begin with a lower case letter or an underscore, followed by lower case letters, digits, underscores, or dashes. They can end with a dollar sign. In regular expression terms: [a-z_][a-z0-9_-]*[$]?

On Debian, the only constraints are that usernames must neither start with a dash ('-') nor plus ('+') nor tilde ('~') nor contain a colon (':'), a comma (','), or a whitespace (space: ' ', end of line: '\n', tabulation: '\t', etc.). Note that using a slash ('/') may break the default algorithm for the definition of the user's home directory.

  • I'm on linux mint, have the same section on man useradd, and I could create the user. Oct 11, 2019 at 21:13
  • @guillermochamorro Interesting. I've not tested on mine, just giving a hint.
    – user147505
    Oct 11, 2019 at 21:14
  • That is why I am asking how to create Unicode user not ASCII user !! Oct 11, 2019 at 22:09
  • @Eng..Abdalmonem If your system doesn't allow it then you can't.
    – user147505
    Oct 12, 2019 at 9:34
  • Is there a work around ? Oct 12, 2019 at 17:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .