JamesSmith

Well-Known Member
Sep 17, 2003
185
0
166
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.
 

cPanelDavidG

Technical Product Specialist
Nov 29, 2006
11,212
13
313
Houston, TX
cPanel Access Level
Root Administrator
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.
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
 

JamesSmith

Well-Known Member
Sep 17, 2003
185
0
166
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.