The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Reserved Usernames

Discussion in 'E-mail Discussions' started by markwade, Jan 21, 2011.

  1. markwade

    markwade Registered

    Joined:
    Jan 21, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hello,

    I noticed that trying to create an account with a username starting with "test" generates an error:
    "Sorry, that username is reserved."

    Firstly, is there a list of reserved usernames somewhere so I can make my program account for that? Or perhaps an API function we can call before createacct to check a username's validity?

    Also, the error message doesn't appear to have an error code - will it always be that exact message (i.e. even if CPanel is running in a different language)? I'm just wondering how would be best to properly catch errors like this, given that there is no error code with the message (that I can see).

    Thanks in advance!
     
  2. MattDees

    MattDees cPanel Product Owner
    Staff Member

    Joined:
    Apr 29, 2005
    Messages:
    417
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    The reserved username check is the following list:


    root virtfs roundcube horde spamassassin eximstats cphulkd modsec all
    dovecot tomcat postgres mailman proftpd cpbackup files dirs tmp toor munin


    plus

    anything beginning with the string "test" or ending with the string "assword"

    as for catching that, this is an unlocalized error, so the string is what you have to work with for now.

    The other possible error strings related to user attributes are:

    "Sorry you must provide a valid username"
    "Sorry, that username is reserved."
    "Sorry, a group for that username already exists."
    "Sorry, you must provide a valid contact email address."
     
  3. metrotech

    metrotech Registered

    Joined:
    Feb 2, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Hi,


    cPanelMatt or anyone else please provide some information on the other error strings like what causes them?

    What is a valid user name in whm? I've tried several and keep getting the same error "sorry you must provide a valid user name".

    Thanks
     
    #3 metrotech, Feb 2, 2011
    Last edited: Feb 2, 2011
  4. metrotech

    metrotech Registered

    Joined:
    Feb 2, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Well "james" is valid but "fsandford" is not. I don't see why "fsandford" would not be valid.

    Also, now that I know "james" works as a user name, my own email address is being rejected as invalid.

    So what constitutes a valid email in cpanel/whm? This is a little bit rediculous :confused:
     
  5. metrotech

    metrotech Registered

    Joined:
    Feb 2, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Sorry there seems to be a problem in my PHP having to do with using variables in the xml-api string. Simply putting the email in the string works but putting &contactemail='.$email.' doesn't . I'll have to look into that.

    I'm still not sure this should have any affect on the "james" vs. "fsandford" user name though.

    So in conclusion, it still seems rediculous but seems to be a problem with PHP and not the xml-api.
     
  6. metrotech

    metrotech Registered

    Joined:
    Feb 2, 2011
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    PHP problem is fixed but still won't accept "fsandford" because there seems to be a limit of 8 characters set. How can that be changed? such a limit seriously limits the ability of a customer to find a user name that isn't already used and makes any since to them as a user name.
     
  7. cPanelDavidN

    cPanelDavidN Integration Developer
    Staff Member

    Joined:
    Dec 17, 2009
    Messages:
    571
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Hi metrotech,

    Your point is understood and has been a feature request for a while. We're working towards that goal currently.

    cPanel limits the username to 8 characters for a few reasons, most of which fall into to categories: 1) OS and 2) sub-systems/services

    1) cPanel has been around a long time and has had varying levels of support on mulitple *nix based platforms. Unfortuanately, not all of those platforms where designed to accomodate usernames with a length greater than 8 characters. In our current product we must provide legacy support of those systems.

    2) Some sub-systems and services that are utilized by the system are tightly coupled with cPanel and cPanel usernames. Some of these sub-systems were designed with a similar paradigm or analogous limits as I describe above about OSes. Because of these, we have a bit of "chicken and egg" situation.

    One of our broader goals is to decouple these sub-systems from the cPanel product. By doing this, we abstract these relationships and item #2 is a non-issue (ie, deferred to a smarter, more complex codebase). Additionally, cPanel has introduced a End Of Life Policy that should help reduce the legacy support (OS wise) required within the product and help free such limitations in future versions.

    Best Regards,
    -DavidN
     

Share This Page