Reserved, Invalid, and Misconfigured Usernames in cPanel & WHM

This article explains cPanel & WHM’s username restrictions, reserved usernames, special cases, and how to resolve issues with invalid, restricted, or misconfigured usernames. It also covers how to rename accounts and fix incomplete username configurations.

cPanel username rulesreserved usernamesWHM modifyacct

~3 min read · Updated Feb 14, 2026

1. Introduction


cPanel & WHM enforces strict rules for usernames to ensure system stability and security. This guide explains username restrictions, reserved names, special exceptions, and how to resolve issues when a username is invalid, reserved, or misconfigured.


2. Basic Username Restrictions


When creating or modifying a cPanel or WHM username, the following rules apply:


  • Usernames may only contain lowercase letters (a–z) and digits (0–9).
  • Usernames cannot exceed 16 characters.
  • Usernames cannot begin with a digit or the string test.
  • Usernames cannot end with the string assword.

3. Special Cases


  • You cannot create a username containing a hyphen (-), but you may transfer an account with a hyphenated username to another system.
  • To allow usernames longer than eight characters, set the following in /var/cpanel/whm/nvdata/root.yaml:

LONGUSERS: 1

  • If using MySQL or PostgreSQL, the first eight characters of all usernames must be unique.

Note: You can disable database prefixing in WHM » Tweak Settings » SQL.


  • To allow usernames beginning with digits, create the following file:

/etc/allowstupidstuff

  • You cannot use a username that matches a group name in /etc/sudoers or /etc/sudoers.d.

4. Reserved Usernames


cPanel & WHM reserves certain usernames for system use. These cannot be used for cPanel or WHM accounts.


Important: Since TSR‑2017‑0006, email aliases in /etc/aliases and /etc/localaliases are also reserved. Any alias pointing to a reserved username is also restricted.


4.1 Files Checked for Reserved Names

  • /usr/local/cpanel/Cpanel/Validate/Username/Core.pm
  • /etc/aliases
  • /etc/localaliases

4.2 Default Reserved Aliases

UsernameAliases
rootadmin, abuse, adm, apache, bin, daemon, ftp, mail, mysql, named, nobody, postmaster, security, sshd, system, webmaster, wheel, xfs, and many more
postmasterinfo, mailer-daemon, marketing, sales, support
newsnewsadm, newsadmin, usenet
ftpftp-adm, ftp-admin, ftpadm, ftpadmin
webmasterwww

5. Resolving Username Problems


5.1 Rename an Invalid or Reserved Username

To rename an account, run the following command as root:


whmapi1 modifyacct user=username newuser=newusername

Note: Replace username with the current restricted username and newusername with the desired valid username.


5.2 Remove Username Aliases

You may remove reserved aliases from:

  • /etc/aliases
  • /etc/localaliases

6. Misconfigured Usernames


A misconfigured username is incomplete or missing required system data. To fix it, run:


/usr/local/cpanel/scripts/updateuserdomains --force

Conclusion


Understanding cPanel & WHM username restrictions helps prevent account creation issues and ensures system stability. When problems occur, renaming accounts or repairing misconfigurations with the appropriate commands resolves most issues quickly.


Written & researched by Dr. Shahin Siami

Related Articles

How to Restore Your cPanel Account: A Complete Guide for New System Administrators

This guide explains how new system administrators can restore a cPanel account using WHM, transfer accounts and configurations between servers, and enable diagnostic logging for transfer and restore operations. It covers essential concepts such as WHM vs. cPanel, root access, backup handling, SFTP uploads, transfer methods, and advanced debugging tools.

Continue

آموزش کامل انتقال تمام اکانت‌های cPanel از یک سرور به سرور دیگر

این مقاله نحوه انتقال همه اکانت‌های cPanel، تنظیمات سرویس‌ها، گواهی‌های SSL و IP اصلی سرور را از یک سرور قدیمی (Source) به یک سرور جدید (Target) توضیح می‌دهد. شامل نصب سرور جدید، انتقال تنظیمات، انتقال اکانت‌ها، تغییر IP، تنظیم DNS و نصب مجدد SSL است.

Continue

How to Migrate a WordPress® Installation to a cPanel & WHM Server

This guide explains how to migrate a WordPress installation from a macOS-hosted environment to a cPanel & WHM server. It covers exporting the database, uploading WordPress files, creating and importing a MySQL database, updating URLs, configuring wp-config.php, fixing broken links, and finalizing the migration.

Continue

How to Manually Transfer an Account Between Servers in cPanel & WHM

This article explains how to manually transfer a cPanel account between servers when the account is too large for WHM’s automated transfer tools. It covers creating temporary directories, compressing public_html and log files, securely transferring data with SCP, and restoring the files on the destination server.

Continue

How to Manually Migrate Horde Calendars and Contacts to Roundcube in cPanel & WHM

This article explains how to manually migrate Horde calendars and contacts to Roundcube in cPanel & WHM version 108 through 118. It covers exporting Horde data, placing it in the correct directories, and importing it into Roundcube using built‑in plugins or manual import tools.

Continue

How to Manually Migrate Accounts to cPanel & WHM from Unsupported Control Panels

This article explains how experienced system administrators can manually migrate accounts from unsupported third‑party control panels to cPanel & WHM. It covers pre‑migration steps, installation requirements, file and directory transfers, database restoration, SSL migration, and post‑migration tasks.

Continue