create account with username containing "-"

yoachan

Well-Known Member
Jan 10, 2010
65
0
56
Dear all,

we have an older machine that uses cpanel, and a user -- let's just say "mr-x" with a "-" in it.
Almost a year ago we move this account to another machine without cpanel, and now we need to move it to our latest machine that uses WHM 11.28.64.

When I use "Main >> Account Functions >> Create a New Account" and enter "mr-x" as name, I get this message:
"Username must be only alphanumeric characters."

My question is:
1. is there any legal way for me to create an account with "-" in it's name.
I need to preserve "mr-x" for a bunch of databases related to it, so if I have to change "mr-x" to -- let's say "mrx" I will need to change configuration for a lot of sites...
2. Is there any specific reason why we can't use an "-" as a part of username? for linux it self allow us to use either "-" and "_" as a part of username. It's not likely I'm asking a "$" or "%" as a username. It's just a simple "-" that I don't think will do any harm for any OS... CMIIW

thanks in advanced.

Regards,

Yoachan
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
There would not be a way to allow a - in the cPanel username. MySQL has issues with database names with a - in them on some systems. The best course of action is to convert the user to a new username that will function going forward. While it might be an issue now, it is better to have it handled at this point, since the - hasn't been allowed for at least 5 years in a new account's username with cPanel.
 

yoachan

Well-Known Member
Jan 10, 2010
65
0
56
Dear Tristan, thank you for your reply,

Doh...... :rolleyes:
It's been years that we use a username using "-" and it never has any problem with mysql... :confused:

Ok if that's the case, second scenario that come in our mind: now that we already have a machine with this "mr-x" user that doesn't use WHM (for this specific machine we use other web-based interface for system administration). We are thinking about updating this machine to use WHM/cpanel too. is it possible to switch from other system administration to WHM? And if it's possible, is it possible to preserve this account too? (I know it will be way separated topic, but a yes-no question wouldn't hurt, for it's still related anyway...) :D

regards,

yoachan
 

Infopro

Well-Known Member
May 20, 2003
17,112
514
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Dear Tristan, thank you for your reply,

Doh...... :rolleyes:
It's been years that we use a username using "-" and it never has any problem with mysql... :confused:

Ok if that's the case, second scenario that come in our mind: now that we already have a machine with this "mr-x" user that doesn't use WHM (for this specific machine we use other web-based interface for system administration). We are thinking about updating this machine to use WHM/cpanel too. is it possible to switch from other system administration to WHM? And if it's possible, is it possible to preserve this account too? (I know it will be way separated topic, but a yes-no question wouldn't hurt, for it's still related anyway...) :D

regards,

yoachan
I'm not sure the second scenario is any different from the first, is it?
 

yoachan

Well-Known Member
Jan 10, 2010
65
0
56
@Infopro: thanks for your reply.

I'm not sure the second scenario is any different from the first, is it?
Yes, this two scenarios is differ. In my first scenario, I tried to move one of my accounts (mr-x) -- let's say from machine 'A' -- to another machine (machine 'B') that uses WHM/cpanel. Machine 'A' has no WHM/cpanel. This where my first question start because I'm stuck for 'mr-x' can't be created in a WHM machine.

In my second scenario I changed my mind and decided not to move 'mr-x' to machine B, but to use WHM/cpanel in machine 'A' while "mr-x" still in it. Keeping 'mr-x' is not our primary reason why we want to plug cpanel in machine A, but for some reason we are thinking about using WHM/cpanel for all of our machine.

So, is it possible to plug WHM to an already running machine? and if it's possible, is possible for me to keep mr-x in that machine?

regards,

Yoachan
 
Last edited:

Infopro

Well-Known Member
May 20, 2003
17,112
514
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
Well, I think they are the same in that mr-x will not be permitted as cPanelTristan has explained. Also I should mention that you will not be able to upgrade an existing server with clients on it, to a cPanel Powered Server. Please do not attempt to or you will make a mess I'm sure.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
somewhere over the rainbow
cPanel Access Level
Root Administrator
MySQL does have an issue with dashes on some systems:

mysql dash databases - Google Search

The first several hits for those keywords are bugs relating to how it has difficulty handling these.

Prior to MySQL 5.1, it also had issues converting them per MySQL's own reference manual at MySQL :: MySQL 5.1 Reference Manual :: 12.1.1 ALTER DATABASE Syntax :

For example, if a database in MySQL 5.0 has the name a-b-c, the name contains instances of the - (dash) character. In MySQL 5.0, the database directory is also named a-b-c, which is not necessarily safe for all file systems. In MySQL 5.1 and later, the same database name is encoded as [email protected]@002dc to produce a file system-neutral directory name.