bug in "Change Domain Name"

Virtualmin Team,

I think I found a bug in "Change Domain Name".

(note that I used username@domain format)
(this is a new Debian 7.1 install, using latest Virtualmin install.sh)

Assuming I have the following:

- domain1.com, with Administrative user domain1_admin
- domain2.com, with Administrative user test_admin

I go into Virtualmin -> System Configuration -> Change Domain Name

and try to change the Administrative user for domain1.com to test_admin

1) Virtualmin does this
2) but there's a MySQL error listed

From there, no matter what I do, I can't get the MySQL error to stop appearing.

Renaming MySQL user ..
.. MySQL user does not exist!

I tried to add it manually to the user table in the mysql database, but it didn't work.

And, I tried to change them back, but got these errors on validation:

1) Administration user : Administration group domain1_com_admin has GID 1016, but the domain's GID is 1022

2) Administration user : Administration group domain2_com_admin has GID 1022, but the domain's GID is 1016
3) MySQL database : MySQL login test_admin does not exist
4) Webmin login : Webmin user domain2_com_admin does not exist

I had to delete both domains and re-create to get this resolved.

REQUEST: You need to block changing Administrative username when it already exists!

Thx! : )

Closed (fixed)


Yes, Virtualmin should prevent a username change from causing a clash with another domain. I'll fix that in the next release.

Were all the other issues triggered only when renaming a domain's user to a name that is already in use?

Yep, just get the clash fixed, all others will be fine. Thx! : )

Ok, cool - the next release will fix this.

Automatically closed -- issue fixed for 2 weeks with no activity.