PDA

View Full Version : Best solutions to update a domain name


pascal
11-21-2006, 01:19 PM
Hello,

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 aaaa.com and now he'd like to cha,nge his domain name to aaaa.fr


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 aaaa.com by aaaa.fr
- Copy the aaaa.com.conf file to aaaaa.fr.conf 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 ?

Thanks

Pascal

IWorx-Socheat
11-21-2006, 02:03 PM
There's actually no way to do this Pascal. The closest you can get is to add the aaaa.fr domain as a pointer domain to the aaaa.com account.

Socheat

pascal
11-22-2006, 11:34 AM
Thanks Socheat....

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

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 aaaa.com 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 ?

Pascal

IWorx-Tim
11-23-2006, 08:14 PM
Socheat is with his family in Michigan for Thanksgiving. :-)

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/aaaa.com/html instead of aaa.fr
2. ftp user will still be ftp@aaaa.com not aaaa.fr
EDIT: 3. email logins will still be user@aaaa.com

pascal
11-23-2006, 11:22 PM
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 ?

Thanks

Pascal

IWorx-Tim
11-24-2006, 01:06 AM
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.

pascal
11-24-2006, 01:21 AM
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 albacalau.com and is now albacalau.fr so :
User is still albacala
Path is still /home/albacala

The path to be changed is /home/albacala/albacalau.com to /home/albacala/albacalau.fr
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 ;) and I understand it is a hard job to change all the soft :)

Thanks Tim

Pascal

IWorx-Socheat
11-24-2006, 08:19 AM
Don't forget to rename /home/albacala/var/albacalau.com to /home/albacala/var/albacalau.fr. How did you go about changing the domain name in the internal iworx database (i.e., which records/tables did you change)?

R-n-R
11-24-2006, 09:25 PM
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 aaaa.fr and copy all data over to the new virtual site instead of setting it up as a Pointer Domains?

IWorx-Socheat
11-24-2006, 11:14 PM
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 ;)

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

whoisjb
12-16-2006, 07:07 AM
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.

EverythingWeb
12-16-2006, 07:56 AM
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 ;)

whoisjb
12-16-2006, 08:00 AM
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. :(

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?

IWorx-Socheat
12-16-2006, 08:03 AM
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?

EverythingWeb
12-16-2006, 08:05 AM
http://www.interworx.com/products/iworx-cp/switch

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. :)

IWorx-Socheat
12-16-2006, 08:07 AM
EverythingWeb beat me to it, and everything he said is correct. :)

whoisjb
12-16-2006, 08:09 AM
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?

EverythingWeb
12-16-2006, 08:13 AM
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.

IWorx-Socheat
12-16-2006, 08:24 AM
How does Interworx go about translating the encrypted passwords from the cpanel import?

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. :)

whoisjb
12-16-2006, 08:24 AM
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.

whoisjb
12-16-2006, 08:33 AM
Okay, so the hash you get from cpanel is directly out of the shadow file on that server (which I do have access to). Just so you know, I have full root access to both servers. I'm not trying to do anything "shady" here. Just trying to make the move as seamless as possible. It's always nice when users don't have to make any changes on their end and their email just keeps working after the move.

I recall when moving from one Ensim box to another a LONG time ago in my earliest days of dedicated servers, that I used some sort of command line tool like "fetch" (not sure what it was called) to login into an email account on the old server and fetch the mail directly into the same email account on the new server. It worked great but I'm not sure if that tutorial I found back then still exists and I can't recall all the details. Seems like I had to create a config file that had the login info for each account on the old server and the new one, then I just executed the program calling on that config. Very nice.

I tell you migrating to new servers is just not fun, is it? :)

EverythingWeb
12-16-2006, 08:37 AM
fetchmail is the program your talking about ;)

... And it's nicely integrated into Horde. We have used it on occasion to pull some mail accounts across from our older, non-CP servers and it works a treat. :D

EverythingWeb
12-16-2006, 08:41 AM
I tell you migrating to new servers is just not fun, is it?

You're definately not wrong! :)

whoisjb
12-16-2006, 08:42 AM
By the way, I'm really impressed with iworx so far! When do you plan on v3 being released and what kind of new features will be available that you're sure of at this point? I'm sure it may be some time before the next major release but I'm excited that a new control panel is available that actually seems to contend and is well put together. If you've already answered this question on the boards, no problem. Just point me in the right direction.

whoisjb
12-16-2006, 08:55 AM
I see the fetch mail icon in Horde, however, I don't see how to add external accounts here. I clicked on options and didn't see anything there either.

IWorx-Socheat
12-16-2006, 08:58 AM
Okay, so the hash you get from cpanel is directly out of the shadow file on that server (which I do have access to).

Actually, no. We get it out of the cPanel backup file. You create a full cPanel backup on the server (or we initiate a full backup via our Mass Import interface). The backup file contains a file with the email password hashes, and that's where we pull from.

I tell you migrating to new servers is just not fun, is it? :)

Agreed! Our importers try to simply the process as much as possible :)

By the way, I'm really impressed with iworx so far! When do you plan on v3 being released and what kind of new features will be available that you're sure of at this point? I'm sure it may be some time before the next major release but I'm excited that a new control panel is available that actually seems to contend and is well put together. If you've already answered this question on the boards, no problem. Just point me in the right direction.

You jumped on board at just the right time. :) We'll be releasing v.3.0 soon, within the next month. Talk about new features are scattered throughout the forums, but you may want to check the Feature Request forums to start.

EverythingWeb
12-16-2006, 09:18 AM
When do you plan on v3 being released and what kind of new features will be available that you're sure of at this point?

There is a nice little page on the main interworx website which I spotted shortly after HostingCon this year:

http://interworx.com/products/iworx-cp/new-features

I see the fetch mail icon in Horde, however, I don't see how to add external accounts here. I clicked on options and didn't see anything there either.

At first it can be a little difficult to work out, so here's the easy steps:

Login to Horde > Mail > Options > (Middle pane, bottom) Fetch Mail > Edit your preferences for accessing other mail accounts.

Then select create new profile etc and follow the instructions :)

pascal
02-04-2007, 07:09 PM
12-16-2006, 03:58 PM - You jumped on board at just the right time. We'll be releasing v.3.0 soon, within the next month

oups .... :p ;)

Joke of course :rolleyes: :cool: :)

whoisjb
02-05-2007, 05:49 AM
So, version 3.0 is not coming out soon?

pascal
02-05-2007, 07:33 AM
Well if Socheat said it should come within the next month, then it should come out soon.

But I can't tell you more as I don't know more about this.

Just wait and see :)

Pascal