Reserved, Invalid, and Misconfigured Usernames
This document explains cPanel & WHM’s username restrictions and what to do if you encounter an invalid, reserved, or misconfigured username.
cPanel & WHM applies the following rules when you create or modify a cPanel or WHM username:
Usernames may only use lower letters (
a–z) and digits (
- Usernames cannot contain more than 16 characters.
- Usernames cannot begin with a digit (
0–9) or the string
- Usernames cannot end with the string
- You cannot create a username with the hyphen character (
-), but you can change an account’s name to use a hyphen when you transfer that account to another system.
- To allow usernames over eight characters in length, set the
LONGUSERS: 1environment variable in the
- If you plan to use MySQL® or PostgreSQL® as a database engine, the first eight characters must be unique on the system.
You can disable database prefixing with the Add prefix to names of new databases and database users option in the SQL section of WHM’s Tweak Settings interface (WHM >> Home >> Server Configuration >> Tweak Settings).
- To allow leading digits in a username, create the
/etc/localaliasesfiles. The system will also reserve usernames that are aliased to a reserved username.
cPanel & WHM reserves some usernames for the system’s use, and you cannot use them for cPanel or WHM accounts. This list of reserved usernames can grow over time, and new versions of cPanel & WHM may add to this list.
cPanel & WHM checks the following files to determine whether to reserve or restrict a username or alias:
By default, the system reserves the following list of aliases:
To resolve issues with invalid, reserved, or restricted usernames or aliases, perform run the following command as the root user to rename the account:
whmapi1 modifyacct user=username newuser=newusername
In this example,
username represents the current (restricted) username, and
newusername represents the new username that you wish to assign to the account.
Remove username aliases
You can also remove reserved aliases from the
Misconfigured usernames do not possess some information or exist in an incomplete state. To fix a misconfigured username, run the following command as the root user: