Problem with changing username

Dendik

Verified User
Joined
Apr 26, 2011
Messages
5
I was trying to change my client username using this command

Code:
cd /usr/local/directadmin/scripts
./change_username.sh olduser newuser

But when i executed the command it shows

Code:
Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /usr/local/directadmin/scripts/change_database_username.php on line 46

Warning: preg_replace(): No ending delimiter '_' found in /usr/local/directadmin/scripts/change_database_username.php on line 78

Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /usr/local/directadmin/scripts/change_database_username.php on line 81

Warning: preg_replace(): No ending delimiter '_' found in /usr/local/directadmin/scripts/change_database_username.php on line 84
Starting MySQL SUCCESS!

And now the database user has become -1

what should I have to do to restore it ?
Do I need to edit the change_database_username.php ,but what values should I put it ?

Thanks
 
Honestly ive no idea about this issue, i would really suggest you to contact directadmin support for some suggestions/solutions.

Regards
 
Error

Exactly the same problem here :( this should be a pretty straight forward thing to do, but the database users get set to -1.
Anyone a suggestion for a solution or maybe a workaround to correct this using SSH. I really don't know where to start looking for this.
 
Hello,

After looking into it, I've found a bug in the change_database_username.php, mentioned here:
http://www.directadmin.com/features.php?id=1269

However, I'm not sure that it relates to the errors you've mentioned.
If you change the username twice, then it may be related, as the db was never changed in the first place.

Which version of PHP, MySQL and OS version are you using? I'll see if I can duplicate it in a more specific environment.

John
 
In my case this error occurs on a virtual machine running:

Centos 5.5 64 bit
Directadmin 1.36.2
Php 5.2.17
MySQL 5.0.67

I think I need to upgrade to the latest DA version, it's in queue as we speak..
 
Although I was never able to exactly duplicate the error message mentioned above, I've made changes to the script using my best guess as to what was causing it, and found/fixed another error while I was doing that.
Let me know if you run into the error again.

John
 
Had this when i moved some accounts. Make a backup within for example: phpmyadmin. delete database, create new one, add your backup to the database.

it happend when moving accounts and changing name from for example: user1 to a1234001 ( <-- 001 == server id <-- a == company )

after this, the count was good again @ user count.
 
Last edited:
Back
Top