aingaranweb

Well-Known Member
Mar 23, 2003
65
0
156
Toronto, Ontario
Ok, here's the thing.

I had a client with abc.com and username abc.

He wanted me to change the domain to xyz.com and username to xyz.

I went to WHM and "modify account" selected the account made the 2 changes with the domain & username.

Now, everything is f'd up!

In WHM view bandwidth usage, it doesn't show either abc.com or xyz.com

In Cpanel the bandwidth stats & mysql stats are incorrect.
Bandwidth shows 0, Mysql also shows 0.
When he clicks on MySQL databases, there are no databases listed.

When he clicks on Phpmyadmin, no databases listed.

He runs a messgae board and in the config file it still says abc_forumdtabase instead of xyz_forumdatabase and the message board is running without any problems.

Can someone help me correct the problem?

Thanks,
 

Imago

Well-Known Member
Feb 21, 2004
45
0
156
After changing the USERNAME everything disappears in 8.8.0 - no site, no dn resolution, no anything. Changing back to the original USERNAME restores everything.
 

mikejr

Registered
Dec 5, 2003
3
0
151
This is a sticky, so there must be significance to the post...

However, I seem to be missing it. It is ok to change the domain, just not the username? If it isn't ok to change the username, why is there the provision to do so?
 

SuperBaby

Well-Known Member
Nov 27, 2003
345
1
166
Thailand
cPanel Access Level
Website Owner
Twitter
Well, this is a bug in WHM. In fact, I feel that this is the biggest bug of WHM. I was sad to see that it wasn't corrected during the recent update.

There are a few things you can do:

1) Delete the old account and set up a new one. This is fine if your customer's account is still new and has nothing much inside.

2) Park xyz.com on top of abc.com and leave the latter intact.

3) Edit all config files manually via SSH. Unfortunately I do not know the exact steps/files.
 

PackCat

Active Member
Jan 20, 2004
27
0
151
Charlotte, NC
Originally posted by mikejr
It is ok to change the domain, just not the username?
usernames (userID's) are usually tied-up in the system /etc/passwd file and will default to something like:
/home/abc

if you change the username, you would be making a system change to:
/home/xyz

unless cpanel is smart enough to MOVE all of the abc files over to the NEW xyz home directory, I can see where the link would be lost, and how it is magically recovered when you rename it back.
 

PackCat

Active Member
Jan 20, 2004
27
0
151
Charlotte, NC
Originally posted by SuperBaby
Well, this is a bug in WHM. In fact, I feel that this is the biggest bug of WHM
Are you referring to the fact that if you rename a domain, say: (myhost.mydomain.com to www.myhost.com) that it loses all DNS capabilities? I ended up deleting and re-creating the domain, and it resolved instantly.

one other thing...

when someone creates a new domain account "myhost.mydomain.com",
is it absolutely necessary for it to pass (Server Name www.myhost.mydomain.com) to the Apache httpd.conf?

afterall, if I wanted to call it: www.myhost.mydomain.com, I would have told WHM to create a domain called exactly that.

I don't don't know who wrote the RFC's on that one, but it is very silly to me. instead, I would like to think of domain structures like:

www.mydomain.com
fm.mydomain.com
forums.mydomain.com
bbs.mydomain.com
users.mydomain.com

as standalone entities and should created as such in Apache httpd.conf... AND www should only be the default, if hardcoded into the domain creation process!!!

The only exemption to that rule should be if you (create an account named: mydomain.com, then the line entry in Apache httpd.conf should read: "ServerAlias mydomain.com www.mydomain.com"
(notice that I aliased the "www" not the mydomain.com)
 

zentity

Well-Known Member
Jun 16, 2004
78
0
156
Just a note for people who are using the change username function in whm - Check your /etc/passwd /etc/group and /etc/shadow files regular - Sometimes the change username 'feature' will leave a bad entry in all those files - Your backups are generated by the the backup script wallking down your passwd file, if it comes across a bad entry like this

x:32012:32013::/home/

(Notice the user is missing) then your cPanel backups (if you do them) will stop there, no further accounts will be backed up.
Generally, the same left over bits as above will be in /etc/passwd /etc/group and /etc/shadow
This happens quite a bit that I have seen, so checking that and removing those bad entries is recommended - You can easily see if backups are up to date by viewing the date they were last done, if you find that some accounts backups are old, and they exist on your system, check those files ;)
 

tripchord

Registered
Feb 21, 2004
3
0
151
So I changed the domain name of a clients account and now everything is messed up. My client hosts other people on her subdomains and that would basically have to get manually added in? Also her emails do not work.

Why hasn't this been fixed yet? It has been 7 months since the first post was made... I think that's rediculous. Why have the option in WHM if it messes up everything for everyone? How is that being helpful.
 

zentity

Well-Known Member
Jun 16, 2004
78
0
156
I'd have to agree that the change username/domain feature should be selectable - as a tweak maybe - I think the only way to disable it is to take away the modify account link in whm at the present time.

I'd like this to be a 'selectable feature' for those that want to have it, as it does cause generally a few problems.

I'm not sure if there is a feature request in for this - I'll send one in and see what happens.

Bugzilla Enhancement request
http://bugzilla.cpanel.net/show_bug.cgi?id=1036
 
Last edited:

primate

Registered
Aug 22, 2004
1
0
151
so what happens to existing email?

I've a client who needs to change her domain name for legal reasons, and it's an existing site with existing email addresses, database and so on. I was advised by my hosting company to use the modify account option, and came on here to check out what would happen to existing email. From what I'm reading here, perhaps I shouldn't do the domain name change (certainly not going to change the username!) but I don't have a great deal of option as to how else to achieve this.

Any ideas what will happen with existing email?

Thanks

Jax
 

zentity

Well-Known Member
Jun 16, 2004
78
0
156
Not every usage of the change user name feature will cause a problem - Most times I think the problems arise either because the account is mis configured initially (users sometimes don't unpark domains or remove addons before making them an account within whm - just one example) or the process is interrupted.

So your mileage will vary - Most times you won't have an issue, but to be safe, you would just backup the sites content and then delete the account. Then create it again as needed, reloading your backups.
 

mhbrands

Member
Apr 12, 2003
17
0
151
Kansas
If I were going to change an account, I would create a new account with the new name and give the customer a set number of days to transfer his/her files and then close the old account. From what I can see, changing the domain name basically changes the entire account anyway. That would be like saying "I changed a customer's hotel room to one on the 3rd floor, but didnt move his luggage. Why arent his suits in the closet?"

It's a whole new account and has to be set up as a new account. a username can easily be changed, and you can userdel the old name to make sure it left the server.
 

BigPete

Member
Dec 4, 2003
10
0
151
Problem seems to also occur when changing ownership of an account. Account does not get listed in the reseller's panel.
 

SuperBaby

Well-Known Member
Nov 27, 2003
345
1
166
Thailand
cPanel Access Level
Website Owner
Twitter
:) I have tested changing the ownership (to the reseller) many times without problem. I can see the accounts listed under the reseller's WHM.

:) Today, I created a dummy/test account with the domain name hello.com. Then I renamed the domain name under "WHM >> Modify an account" to hello.net. Everything was OK. I could see the new domain name listed in all functions. But I have not tested changing the username. Perhaps someone might want to try it and post the result here.
 

nettigritty

Well-Known Member
PartnerNOC
Jan 21, 2004
192
0
166
Bangalore, India
SuperBaby said:
:) I have tested changing the ownership (to the reseller) many times without problem. I can see the accounts listed under the reseller's WHM.

:) Today, I created a dummy/test account with the domain name hello.com. Then I renamed the domain name under "WHM >> Modify an account" to hello.net. Everything was OK. I could see the new domain name listed in all functions. But I have not tested changing the username. Perhaps someone might want to try it and post the result here.
try that with an add on domain present in that account ..
 

SuperBaby

Well-Known Member
Nov 27, 2003
345
1
166
Thailand
cPanel Access Level
Website Owner
Twitter
iHost.net.nz said:
:cool:

Temporary fix:

Create an account, then delete it. All the domains should now show.

:D
I changed an account's domain name from xxxxx.com to xxxxx.net. Both xxxxx.com/net disappeared under "List all accounts". Under "Modify an account", it is still showing xxxxx.com.

I tried the tips above and it WORKS! The only error I see is that when I point to www.xxxxx.net (with "www"), it is OK. But without the "www", it points to my main account. Any idea?
 

Jinx

Member
Oct 5, 2003
9
0
151
Does cPanel plan on fixing this in the near future? I attempted to just change the domain on a particular account (they wanted to keep thier previous username) and it wreaked total chaos.