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.

Username Format?

Discussion in 'General Discussion' started by jhyland87, Jun 10, 2009.

  1. jhyland87

    jhyland87 Well-Known Member

    Joined:
    Dec 8, 2008
    Messages:
    153
    Likes Received:
    0
    Trophy Points:
    16
    I am making a script that will create accounts in WHM. I need to know the formula that cPanel uses when creating usernames..

    if the domain is thisisatest.com, I know it takes the first 8 out of the domain, so it would be thisisat, but I know it has rules....

    1) Must not start with a number
    2) Must not have a dash

    What are the other rules? I need to be able to make a domain like "123-abc.com", and get the username that cpanel will accept.

    Thank you!
     
  2. InstaCarma_Tech

    InstaCarma_Tech Well-Known Member

    Joined:
    Apr 22, 2009
    Messages:
    228
    Likes Received:
    1
    Trophy Points:
    18
    The rules are :

    * Username should start with a lower-case alphabet.
    * Username length can be from 3-8 characters.
    * Username can consist of lower-case alphabets and numbers only.
     
  3. PlatinumServerM

    PlatinumServerM Well-Known Member
    PartnerNOC

    Joined:
    Jul 10, 2005
    Messages:
    397
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    New Jersey, USA
    cPanel Access Level:
    Root Administrator
    For security purposes, the username should not contain command words like 'test' or 'demo', and should not be the first 8 letters of the domain name. Hackers try those first and that makes it much easier for them to brute force hack.
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    cPanel users are Unix users, so all the restrictions of a valid Unix user do apply.
     
  5. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    jhyland87, just to make sure you are aware of this ...

    You do know there is an API for Cpanel and also a number of account creation
    scripts already built and floating around, right? I've written and have a
    collection of a sizable number of them in archive myself.

    (Just making sure you aren't re-inventing the wheel so to speak :D )
     
Loading...

Share This Page