Best solutions to update a domain name


I would like to know what is the best solution to change a domain name to another for an existing account.

Indeed, we have a siteworx account with the domain name and now he’d like to cha,nge his domain name to

This client has alreadu changed the dns server to his new domain name to point to our dbns serveur.

We plan to :

  • Update the dns data for this domain to change by

  • Copy the file to file in etc/httpd/conf.d/ and change revelant data

  • But how to change the domain name in the nodeworx list of accounts ? and allow the user to connect to his new domain name with siteworx.

We want to keep all the files/database/password/account/mails of the old domain name, we just want to change the name of the old domaine to the new one

For you what’d be the best solution to do this ?



There’s actually no way to do this Pascal. The closest you can get is to add the domain as a pointer domain to the account.


Thanks Socheat…

But please, could you tell me where in the iworx database I have to update the domain name to ?

About the pointer domain. The cause of this update is that our client didn’t renew his domain name and now this one is no longer available. So the is no more pointing his dns to our dns servers.

If I create a pointer domain does the client will still have access to their mails, databases, etc…

I’m pretty sure there is a way (not an easy one ok… but ) to do this. No ? really ?


Socheat is with his family in Michigan for Thanksgiving. :slight_smile:

Simply updating the database WILL NOT work for this as too many things in InterWorx are dependent on the domain name (system path, Lunux user, prefix on database names and users, FTP accounts, probably more that I am not thinking of).

Creating a pointer domain will point all DNS queries to that account so yes they will have access to their email, FTP, SSH and whatnot. The only visible side effects that I can think of are

  1. system path will still be /chroot/home/user/ instead of
  2. ftp user will still be not
    EDIT: 3. email logins will still be

Thanks Tim

I made the changes and all is working great. Thanks anyway

The fact is that as the domaine name is 10 chars long and as iworx use the first 8 chars and as the domain name without the tld doesn’t change, then no pbm for :

  • path
  • username
  • etc

But I understand what you mean

Is there a plan to have this option in a futur release ? v3 ?



I know that option is not in v3 and as far as I know it’s not planned at all, as too much of the software would need to be rewritten because of it, and in your case even if you edited the database all the config files woule need to be rewritten and pathes renamed.

No not in my case

domaine name was and is now so :
User is still albacala
Path is still /home/albacala

The path to be changed is /home/albacala/ to /home/albacala/
The config file to be changed is of course the conf file for this vhost

I promise you it works, but as I said it is only because the domaine name is pretty same.

But it is not a pbm I UNDERSTAND what you’re talking about :wink: and I understand it is a hard job to change all the soft :slight_smile:

Thanks Tim


Don’t forget to rename /home/albacala/var/ to /home/albacala/var/ How did you go about changing the domain name in the internal iworx database (i.e., which records/tables did you change)?

This thread interests me as I know in the future I will need to change the primary domain of a account.

But am I missing something here? In pascal’s case why not just set up a NEW virtual account as and copy all data over to the new virtual site instead of setting it up as a Pointer Domains?

While that would be the “supported” method, the problem with what you suggested, R-n-R, is that you would have to re-create email accounts, passwords, database users and passwords, (and so on and so on) manually. Pascal was looking for a shortcut :wink:

I’m still interested in what entries Pascal edited in the iworx database, because I’m wondering if he got them all. :slight_smile:

Where exactly are the email passwords saved? I looked at the main /etc/shadow file and they didn’t appear to be there. I thought maybe you guys created separate shadow or passwd files in each domain’s directory but I couldn’t find those either. Just curious where you’re keeping them.

I’m in the process of moving over a site from cpanel to interworx and I’m not sure if there’s a way to only import email accounts along with their passwords from one to another. I’ve already setup everything else manually in siteworx leaving only the email accounts before I can flip the switch on the dns.

I believe that cpanel imports actually bring the passwords across with them. We had a reseller join us a year or so ago who migrated in about 45 accounts and I cant recall him having to reset all the email passwords.

As for where they’re stored, there is an internal interworx database (not recommended to go poking around in) and there is a database for vpopmail and a table in there does contain some details for user/password.

Probably best to wait for a dev to confirm though :wink:

The problem is I’m not sure how to only export/import the email accounts from cpanel. I’ve already went through the trouble of manually moving everything else over. I’m new to Interworx so I wasn’t aware they had a cpanel import feature. :frowning:

Anyway, I’ve been working at the command line on Linux servers for a long time and I was simply curious how this control panel stores email account info.

Do you know of a way to import the cpanel email accounts by theirself?

Email passwords are stored internally in the iworx_vpopmail database.

If you create a cPanel backup, you can import this backup in NodeWorx, which will handle restoring the email accounts (creating the accounts and setting the passwords) but not email data (actual email box files), as well as database users and database passwords. At that point, you can move the email data over yourself.

Otherwise, without knowing the clear text password, there isn’t an easy way to add these users and their passwords. How many email users are in this account?

I am pretty sure there isn’t a way to import just email accounts. I’m presuming you have altered the DNS records to point all web traffic to the interworx server, leaving the emails at the cpanel server?

How many sites are we talking of here? It may be that you can run a data backup of all the sites on the interworx server now. Delete the accounts and then do a full mass-import from the cpanel server. The recopy back over the public_html data (as the data on the cpanel server will be either removed or out of date) from the backups you created earlier.

Long way round, buuut, it may be better than manually setting up all the email accounts.

Note: The steps above are completely rough and I cant guarantee that it’ll work, but it’s certainly an option we would investigate in your situation. :slight_smile:

EverythingWeb beat me to it, and everything he said is correct. :slight_smile:

Looks like 31 accounts. I have some of the passwords but others are unknown even by the account owner since they’ve been saved in Outlook for so long. I can always reset them and allow the user to change them to whatever they choose via Horde. I’ve always worked with Plesk in the past and every experience I’ve had with cpanel is negative. Not sure how that control panel is so popular. So, I know a LOT about the Plesk environment and where everything is. Very new to Interworx so I’m just trying to figure it all out.

How does Interworx go about translating the encrypted passwords from the cpanel import? I’m also assuming the Interworx database is not accessible even at the command line with mysql?

The Interworx database is accessible:
As root, run:

grep dsn ~iworx/iworx.ini

this will return a few lines with the mysql iworx password. Make sure the pw line you look at is the one that connects to the mysql.sock in /home/interworx/ etc. Then go to https://serverhostname:2443/mysql

and login with iworx and the password you got from the grep. Make sure to choose the 2nd localhost from the dropdown.

Although it isn’t recommended to be do much in there.

We create the email user with a random password, then we use a MySQL query to replace the password hash with the one stored in the cPanel file. You can do the same yourself, it’s the iworx_vpopmail.vpopmail and it’s the pw_passwd column. Like EverythingWeb, we typically tell users to stay out of the internal InterWorx database, but if you’re very careful, and only changing the passwords column it should be ok.

You can also access the iworx database from the command line. Follow EverythingWeb’s steps to get the password, then do:

mysql --defaults-file=/home/interworx/etc/my.cnf -u iworx -p

But, obviously, phpMyAdmin is much nicer to work with. :slight_smile:

Thanks. That is useful to know even if for only viewing purposes. I’ll make sure to not make any changes to any of those databases.