6

I've read about what charachers should usernames use, in linux, here: https://serverfault.com/a/578264/330936 but I would like to know if is there any problem if I will use the at sign "@" in my usernames. I will use it especially for my ftp accounts (I have a simple webserver with CentOS 7).

I don't want to be portable to other older versions of linux, nor other distros (maybe debian).

Is there any problem in using @ in usernames?

2 Answers2

28

I'd say it isn't good idea.

I'd recommend to use simple regex:

([a-z_][a-z0-9_]{0,30})

Check following links:

https://stackoverflow.com/questions/6949667/what-are-the-real-rules-for-linux-usernames-on-centos-6-and-rhel-6

https://unix.stackexchange.com/questions/157426/what-is-the-regex-to-validate-linux-users

14

Using '@' in a username would make it impossible to use that username as the local-part of an email address, so I would say that is not a good idea.