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 Prefix

Discussion in 'General Discussion' started by JamesSmith, Jan 18, 2008.

  1. JamesSmith

    JamesSmith Well-Known Member

    Joined:
    Sep 17, 2003
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK, Luton
    Hi,

    Is it possible to add a prefix to account user names WHM creates?

    I want a number added to the start of all new user names, with the ability to change the value per server.

    So one server has the prefix 1, another 2 etc ...

    For example, a user name of an account would be: 1fred

    There is a something in WHM Basic setup, "Home Directory Prefix", but I don't think this is what I'm after. As it refers to the home directory location and not the user name itself.
     
  2. 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
    In a cPanel environment, usernames cannot begin with a number. However, you may be interested in reading the documentation for our /scripts/postwwwacct at:

    http://www.cpanel.net/support/docs/hooks.htm#postwww
     
  3. JamesSmith

    JamesSmith Well-Known Member

    Joined:
    Sep 17, 2003
    Messages:
    185
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    UK, Luton
    Not what I'm after I'm afraid.

    Here's why I need it:

    We want to move MySQL off our servers and onto a separate cluster of MySQL only servers. We need the username prefix for two reasons:

    1) So we can identify on the MySQL cluster which usernames / databases are from which individual cPanel servers
    2) We will then only need to use one instance of MySQL (within a cluster of multiple servers). Running one MySQL instance across multiple cPanel serves is dangerous, as it opens up the potential of duplicate usernames, in its present form

    Web Server One could have a username of "website" but its likely other servers will have the same usernames, creating problems with MySQL usernames and databases conflicting.

    If we could add a prefix on the username, unique per server, this would remove this problem and we could properly remove MySQL onto separate servers for our cPanel servers.
     
Loading...

Share This Page