BuycPanel Blog

BuycPanel Blog

Latest news and updates

A Discussion on cPanel & WHM’s Username Restrictions

Posted by Allura on 18 07 2019.

Introduction
At times, a user comes across an invalid, reserved, or misconfigured username. This document will demonstrate the cPanel and WHM’s username restrictions and will also help in showing the ways to deal with it.Basic Restrictions
While a user tries to create or modify a cPanel or WHM username, there will be some rules which he needs to follow:Usernames must only include numbers like ‘a–z’ and digits like ‘0–9’.
More than 16 characters in a Username is not allowed.
Beginning a Username with a digit (0– 9) or the string test is not allowed.
Ending a Username with the string assword is not allowed.Special Cases
There are certain special rules regarding Username:A Username cannot be created with the hyphen character (-), but can be used in changing an account’s name while transferring that account to another system.
User has to set the LONGUSERS: 1 environment variable in the /var/cpanel/whm/nvdata/root.yaml file in…

Introduction

At times, a user comes across an invalid, reserved, or misconfigured username. This document will demonstrate the cPanel and WHM’s username restrictions and will also help in showing the ways to deal with it.

Basic Restrictions

While a user tries to create or modify a cPanel or WHM username, there will be some rules which he needs to follow:

  • Usernames must only include numbers like ‘a–z’ and digits like ‘0–9’.
  • More than 16 characters in a Username is not allowed.
  • Beginning a Username with a digit (0– 9) or the string test is not allowed.
  • Ending a Username with the string assword is not allowed.

Special Cases

There are certain special rules regarding Username:

  • A Username cannot be created with the hyphen character (-), but can be used in changing an account’s name while transferring that account to another system.
  • User has to set the LONGUSERS: 1 environment variable in the /var/cpanel/whm/nvdata/root.yaml file in order to allow Usernames beyond 8 characters in length.
  • Also, user has to make sure that the first eight characters he will include should be unique on the system, in case he plans to use the MySQL or PostgreSQL as a database engine.
  • User needs to create the /etc/allowstupidstuff touch file, if he wishes to allow leading digits in a Username.

Reserved Usernames

There are certain list of Usernames that the cPanel and WHM have reserved for the system to use, but they are not for cPanel or WHM accounts. The list, however can grow over time, and new versions of cPanel & WHM may get added as a part of this list.

These following files are analysed by cPanel and WHM regarding the reserving or restricting of a Username or alias:

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

Reserved Aliases

The system reserves certain aliases like abuse, adm, mysql, sync, webalizer, named, netdump, news, nfsnobody, nobody, noc, nscd, ntp, nut, operator, pcap, postfix, postgres, xfs, rpc, and many more for the Username root, info , mailer-daemon, marketing , sales , support, for the Username postmaster, newsadm , newsadmin , usenet, for the Username news, ftp-adm, ftp-admin, ftpadm, ftpadmin, for the Username ftp, and www for the Username webmaster.

Conclusion

All information on cPanel and WHM’s Username restrictions is outlined in this review.