{"id":207,"date":"2021-07-23T12:19:20","date_gmt":"2021-07-23T12:19:20","guid":{"rendered":"https:\/\/ssdsunucum.com\/blog\/reserved-invalid-and-misconfigured-usernames\/"},"modified":"2021-07-23T12:19:20","modified_gmt":"2021-07-23T12:19:20","slug":"reserved-invalid-and-misconfigured-usernames","status":"publish","type":"post","link":"https:\/\/ssdsunucum.com\/blog\/reserved-invalid-and-misconfigured-usernames\/","title":{"rendered":"Reserved, Invalid, and Misconfigured Usernames"},"content":{"rendered":"<\/p>\n<div class=\"col-md-9\">\n<div class=\"flex-column flex-md-row article-header\"><\/div>\n<hr>\n<h2 id=\"overview\">Overview<\/h2>\n<p>This document explains cPanel &#038; WHM\u2019s username restrictions and what to do if you encounter an invalid, reserved, or misconfigured username.<\/p>\n<h2 id=\"basic-restrictions\">Basic restrictions<\/h2>\n<p>cPanel &#038; WHM applies the following rules when you create or modify a cPanel or WHM username:<\/p>\n<p>Usernames may <strong>only<\/strong> use lower letters (<code>a\u2013z<\/code>) and digits (<code>0\u20139<\/code>).<\/p>\n<ul>\n<li>Usernames <strong>cannot<\/strong> contain more than 16 characters.<\/li>\n<li>Usernames <strong>cannot<\/strong> begin with a digit (<code>0\u20139<\/code>) or the string <code>test<\/code>.<\/li>\n<li>Usernames <strong>cannot<\/strong> end with the string <code>assword<\/code>.<\/li>\n<\/ul>\n<h3 id=\"special-cases\">Special cases<\/h3>\n<ul>\n<li>You <strong>cannot<\/strong> create a username with the hyphen character (<code>-<\/code>), but you can change an account\u2019s name to use a hyphen when you transfer that account to another system.<\/li>\n<li>To allow usernames over eight characters in length, set the <code>LONGUSERS: 1<\/code> environment variable in the <code>\/var\/cpanel\/whm\/nvdata\/root.yaml<\/code> file.<\/li>\n<li>If you plan to use MySQL\u00ae or PostgreSQL\u00ae as a database engine, the first eight characters <strong>must<\/strong> be unique on the system.\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>You can disable database prefixing with the Add prefix to names of new databases and database users option in the SQL section of WHM\u2019s <em>Tweak Settings<\/em> interface (<em>WHM &gt;&gt; Home &gt;&gt; Server Configuration &gt;&gt; Tweak Settings<\/em>).<\/p>\n<\/p><\/div>\n<\/div>\n<\/li>\n<li>To allow leading digits in a username, create the <code>\/etc\/allowstupidstuff<\/code> touch file.<\/li>\n<\/ul>\n<h2 id=\"reserved-usernames\">Reserved usernames<\/h2>\n<div class=\"callout callout-warning\">\n<div class=\"callout-heading\">Important:<\/div>\n<div class=\"callout-content\">\n        During TSR-2017-0006, we expanded the list of reserved usernames to include email aliases listed in the <code>\/etc\/aliases<\/code> and <code>\/etc\/localaliases<\/code> files. The system will also reserve usernames that are aliased to a reserved username.\n    <\/div>\n<\/div>\n<p>cPanel &#038; WHM reserves some usernames for the system\u2019s 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 &#038; WHM may add to this list.<\/p>\n<p>cPanel &#038; WHM checks the following files to determine whether to reserve or restrict a username or alias:<\/p>\n<ul>\n<li><code>\/usr\/local\/cpanel\/Cpanel\/Validate\/Username\/Core.pm<\/code><\/li>\n<li><code>\/etc\/aliases<\/code><\/li>\n<li><code>\/etc\/localaliases<\/code><\/li>\n<\/ul>\n<h3 id=\"reserved-aliases\">Reserved aliases<\/h3>\n<p>By default, the system reserves the following list of aliases:<\/p>\n<table>\n<thead>\n<tr>\n<th align=\"left\">Username<\/th>\n<th align=\"left\">Alias<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"left\"><code>root<\/code><\/td>\n<td align=\"left\"><code>abuse, adm, amandabackup, apache, bin, canna, daemon, dbus, decode, desktop, dovecot, dumper, fax, ftp, games, gdm, gopher, halt, hostmaster, ident, ingres, ldap, lp, mail, mailnull, manager, mysql, named, netdump, news, nfsnobody, nobody, noc, nscd, ntp, nut, operator, pcap, postfix, postgres, postmaster, privoxy, pvm, quagga, radiusd, radvd, root, rpc, rpcuser, rpm, security, shutdown, smmsp, squid, sshd, sync, system, toor, uucp, vcsa, webalizer, webmaster, wnn, xfs<\/code><\/td>\n<\/tr>\n<tr>\n<td align=\"left\"><code>postmaster<\/code><\/td>\n<td align=\"left\"><code>info, mailer-daemon, marketing, sales, support<\/code><\/td>\n<\/tr>\n<tr>\n<td align=\"left\"><code>news<\/code><\/td>\n<td align=\"left\"><code>newsadm, newsadmin, usenet<\/code><\/td>\n<\/tr>\n<tr>\n<td align=\"left\"><code>ftp<\/code><\/td>\n<td align=\"left\"><code>ftp-adm, ftp-admin, ftpadm, ftpadmin<\/code><\/td>\n<\/tr>\n<tr>\n<td align=\"left\"><code>webmaster<\/code><\/td>\n<td align=\"left\"><code>www<\/code><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"resolve-problems\">Resolve problems<\/h2>\n<p>To resolve issues with invalid, reserved, or restricted usernames or aliases, perform run the following command as the root user to rename the account:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-BASH\" data-lang=\"BASH\">whmapi1 modifyacct user<span style=\"color:#f92672\">=<\/span>username newuser<span style=\"color:#f92672\">=<\/span>newusername<\/code><\/pre>\n<\/div>\n<div class=\"callout callout-info\">\n<div class=\"callout-heading\">Note:<\/div>\n<div class=\"callout-content\">\n<p>In this example, <code>username<\/code> represents the current (restricted) username, and <code>newusername<\/code> represents the new username that you wish to assign to the account.<\/p>\n<\/p><\/div>\n<\/div>\n<h3 id=\"remove-username-aliases\">Remove username aliases<\/h3>\n<p>You can also remove reserved aliases from the <code>\/etc\/aliases<\/code> and <code>\/etc\/localaliases<\/code> files.<\/p>\n<h3 id=\"misconfigured-usernames\">Misconfigured usernames<\/h3>\n<p>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:\n<\/p>\n<div class=\"highlight\">\n<pre style=\"color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4\"><code class=\"language-BASH\" data-lang=\"BASH\">\/usr\/local\/cpanel\/scripts\/updateuserdomains --force<\/code><\/pre>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Overview This document explains cPanel &#038; WHM\u2019s username restrictions and what to do if you encounter an invalid, reserved, or misconfigured username. Basic restrictions cPanel &#038; WHM applies the following rules when you create or modify a cPanel or WHM username: Usernames may only use lower letters (a\u2013z) and digits (0\u20139). Usernames cannot contain more &hellip;<\/p>\n","protected":false},"author":1,"featured_media":208,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/207"}],"collection":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/comments?post=207"}],"version-history":[{"count":0,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/posts\/207\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media\/208"}],"wp:attachment":[{"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/media?parent=207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/categories?post=207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ssdsunucum.com\/blog\/wp-json\/wp\/v2\/tags?post=207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}