Change account Primary Domain name.

brentc

Member
Jul 20, 2010
19
0
51
I have been trying to update an account through WHM using the Modify Account tool (Main >> Account Functions >> Modify an Account).

When I have tried to do this, changing the username and the primary domain, i get the error, Unable to change domain name. But that's all, so I have no idea why at this point.

I know I could technically run the script to back up the account as it is, then terminate the account, create the new account and then unpackage the backup into/as the new account with the new domain name. But, this seems like too much trouble.

Any other ideas as to why my Modify an Account tool is not working for me as I expect?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,260
463
Hello :)

Could you check the cPanel error log (/usr/local/cpanel/logs/error_log) to determine if there are any specific errors when attempting to modify the account?

Thank you.
 

brentc

Member
Jul 20, 2010
19
0
51
The last few errors listed, which may or may not be causing the problem, are related to an add-on domain within the account that is to be changed. It says the following:

warn [subdomain::delsubdomain] Encountered error in subdomain::delsubdomain: Sorry, the subdomain *username* cannot be removed because it is linked to the addon domain(s) 'addondomain.com'. You must first remove the addon domain(s).

There is also this bit:

warn [dnsadmin-ssl] Could not read from zonefile /var/named/'sub.maindomain.com.db at /usr/local/cpanel/Cpanel/NameServer/Local/cPanel.pm line 886
Cpanel::NameServer::Local::cPanel::_cached_zone_fetch(Cpanel::NameServer::Local::cPanel=HASH(0x8e6ded4), '/var/named', 'sub.maindomain.com') called at /usr/local/cpanel/Cpanel/NameServer/Local/cPanel.pm line 773
Cpanel::NameServer::Local::cPanel::getzone(Cpanel::NameServer::Local::cPanel=HASH(0x8e6ded4), '9SSzHJOSD6nIYEnHqYh0t7B6Vkp8kCFA', HASH(0x84f0154), '&zone='sub.maindomain.com') called at whostmgr/bin/dnsadmin-ssl line 587
main::_action_handler('GETZONE', 'local', '9SSzHJOSD6nIYEnHqYh0t7B6Vkp8kCFA', HASH(0x84f0154), '&zone='sub.maindomain.com') called at whostmgr/bin/dnsadmin-ssl line 645


Would this add-on domain be causing the problem?
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
43
348
somewhere over the rainbow
cPanel Access Level
Root Administrator

brentc

Member
Jul 20, 2010
19
0
51
Yes, oh yes. I've actually experienced this before. Sometimes any add-on/sub domain entries do not get "completely" removed from the system. I believe at the time that I ran into this before I was using a different tool however. In this case though, after following the instructions in the post you sent the link to, I was able to successfully use the Modify Account tool to change the account's main domain name.

Thank you again!!