here is a test on ubuntu 14.04 using numbers:
root@ubuntu:~# useradd 232
root@ubuntu:~# mkdir /home/232
root@ubuntu:~# chown 232.232 /home/232
root@ubuntu:~# passwd 232
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@ubuntu:~# login
c2 login: 232
Password:
Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 4.4.0-22-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information disabled due to load higher than 2.0
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
0 packages can be updated.
0 updates are security updates.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
$
$ whoami
232
and one using unicode U+1F600 - π
root@c2:~# useradd π
root@c2:~# mkdir /home/π
root@c2:~# chown π.π /home/π
root@c2:~# passwd π
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@c2:~# login
c2 login: π
Password:
Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 4.4.0-22-generic x86_64)
* Documentation: https://help.ubuntu.com/
System information disabled due to load higher than 2.0
Get cloud support with Ubuntu Advantage Cloud Guest:
http://www.ubuntu.com/business/services/cloud
0 packages can be updated.
0 updates are security updates.
The programs included with the Ubuntu system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
$ whoami
π
This is probably the worst idea I had:
root@c2:~# useradd '&#%^()!@~*?<>=|'
root@c2:~# passwd '&#%^()!@~*?<>=|'
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
root@c2:~# mkdir '/home/&#%^()!@~*?<>=|'
root@c2:~# chown '&#%^()!@~*?<>=|.&#%^()!@~*?<>=|' '/home/&#%^()!@~*?<>=|'
root@c2:~# login
c2 login: &#%^()!@~*?<>=|
Password:
Welcome to Ubuntu 14.04.4 LTS (GNU/Linux 4.4.0-22-generic x86_64)
**** text removed ****
applicable law.
$ whoami
&#%^()!@~*?<>=|
Clearly you can add such a user, although I'm not sure this is a good idea in the long run.
useradd
(fromshadow-utils 4.2.1
) manual page (see CAVEATS ):Usernames must start with a lower case letter or an underscore [...] In regular expression terms: [a-z_][a-z0-9_-]*[$]?
– don_crissti yesterdaylinux
, notubuntu
. Try doing it on archlinux. – don_crissti yesterday