This Wiki page tries to explain the philosophy behind choosing user names for UNIX systems. It has been created with the help of ChatGPT, but then reviewed by a DD for realism. It is a non-Debian augmentation of the UserAccounts page.

What is a Good User name?

Generally, literature suggests the following properties for choice of user names:

User name length

User names tend to become longer and longer over time. While historic UNIX systems restricted the length of a user name to 8 or 16 characters, Linux has rested for a long time on a 32 character limit that is still enforced by adduser at least for system accounts. shadow has advanced to a 255 limit, while it is currently not clear whether this means bytes or characters, which may be different regarding character encoding such as UTF-8

When discussing user name length, a number of factors need to be taken in account. Historic facts in a large number of software packages can interfere.

Tools like ls (when showing ownership with -l) or ps (when listing user processes) may truncate long usernames in their output. This can make it hard to distinguish users with similar prefixes in their names (e.g., verylongusername1 vs. verylongusername2 might both appear as verylong). Truncation often occurs at 8 or 16 characters, depending on the system and utility version.

Tools with columnar output (e.g., ls -l, ps aux) rely on fixed-width or dynamically calculated column sizes. Very long usernames can disrupt column alignment, causing misaligned data and/or fields overlapping into adjacent columns, making output unreadable.

the who and w commands display logged-in users, and long usernames can be truncated in terminal width-limited outputs and/or cause misalignment of subsequent columns.

Tools like mail and write may misbehave with usernames longer than 8 or 16 characters if they rely on the historical utmp and wtmp files, which often store usernames in fixed-width fields.

Some other tools might replace a symbolic name with the corresponding numeric uid/gid to save their formatting.

While modern systems often raise the limit significantly (like 255 characters), practical problems with traditional utilities typically arise at these thresholds:

Basic UNIX User names

These are practical and straightforward usernames, typically conforming to conventions that ensure clarity and simplicity.

Characteristics:

Examples:

Pros:

Suggested Character Rules:

Unnecessarily long usernames should be avoided; 8–16 characters is typically sufficient.

Sane UNIX User names

These usernames strike a balance between being practical and creative while maintaining readability and usability.

Characteristics:

Pros:

UTF-8 Usernames

Unicode allows a broader range of characters:

Examples: müller, søren, 王明, андрей

The PRECIS Framework defines Proposed Internet Standards to handle Internationalized Strings in Application Protocols and https://www.rfc-editor.org/rfc/rfc8265.htmlUsernames and Passwords.

It is possible to create user names containing Unicode characters like ä or ꭥ does work in Debian 12 and in most other Linux distributions. This has been tested in December 2024 for Debian, Ubuntu, Fedora, CentOS Stream and Alma Linux. Most of the distributions expect a dedicated command line option to the call of the respective adduser tool allow such user names. This is probably not wanted.

One of the problems with UTF-8 user names is that it is possible to write strings that look identically in presentation but are different in comparision:

These ambiguities can lead to phishing or identity impersonation, as malicious actors can create usernames that resemble those of trusted users. The remedy for this is to at least use Normalization at least for comparision, duplicate detection and sorting.

At least Debian does not do Unicode Normalization for user names, and the author of these lines suspects that none of the other Linux distributions accepting UTF-8 user names do.

Other issues that Unicode user names might impose are that there are combination characters, characters that need to be presented with different widths, and direction changing characters to allow for right-to-left or up-down languages.

Insane UNIX Usernames

These are the unconventional, humorous, or downright problematic choices that can wreak havoc on systems or raise eyebrows.

Characteristics:

Examples:

Pros:

Cons:

Reserved Characters:

external Documentation

Other Operating Systems

Most of the information in this chapter was collected by Giuseppe Sacco on Debian-Devel - thanks!