Move User Between Resellers

Splet:

The code is fine. The script is to move 1 user to a different reseller. If you check the next line of code below it, you'll see the user.conf section. The domains version is to change the "creator" value for each domain.com.conf file.

scoutman57:

Try the move_domain.sh script. It's beta, but is what you'd be looking for.

John
 
It should be in:
/usr/local/directadmin/scripts/move_domain.sh

Unless I forgot to link it into the update.tar.gz for your OS... which OS version are you running, if you don't see it there? Also make sure you have the latest version of DA.

John
 
John,

Checked out the move_domain.sh script and it shows
<domain> <olduser> <newuser>
Like i said before the domains were build under the user tab of the master admin account and were not built as individual users under the admin reseller tab. I dont have any other users on the system and want to make each domain their own user as if they were created under the reseller tab.

In my case the script would be like this
domain1.com admin <newuser> - not sure what would go in newuser block.

Will this also allow each domain to have individual logins? Be nice if you could assign multipal control panel logins to domains in directadmin.
 
Create new Users to put them under first.
Use fake domains when creating the users.
You can delete the fake domains after.

John
 
Ok John,

I hate to be a pain, but I created a new user under may admin reseller tab.
user1 fakedomain.com
then did
./move_domain.sh domain1.com admin user1
everything went great except for one thing. It did not move the database for that domain to the new user. Is this something I will have to manually do? Looks like mail all went just fine, the accounts were there. Not really seeing anything missing other than the db's for now.

If there is not script to move the db's Can I just log into mysql as root and rename the tables with the user prefix ie: admin_db1 to user1_db1?

Thanks alot for your help be nice for these script to get put in the control panel after they are out of beta. I am use to using webmin and cpanel so I am still learning all the DA tricks.

Thanks a million.
 
Databases have no relation to the domains, so either manually or go into phpmyadmin as "da_admin" (/usr/local/directadmin/conf/mysql.conf) and rename it, along with all the users and accesses/privileges on it.

John
 
One last question. Can you move the main domain (first one created) to a user account, and if so does the main admin have to have a domain inside of if? BTW I moved about 20+ domains with the move_domain script and it works great.

One thing I have not checked it how the move affects cron jobs or system file locations within the website like /home/admin/domains/domain1.com/file.php to
/home/user1/domains/domain1.com/file.php
I am sure all these will need to be updated according to the new file structure layout.
 
You can move any domain to any user.
The Admin account does not have to have a domain.

cronjobs are also not domain related, so would have to be moved over.

John
 
where are the cron jobs file, so i can edit directly in there and not have to re enter cron jobs. I can just edit the file and make the required changes.
 
DA saves them in:
/usr/local/directadmin/data/users/username/crontab.conf

but that doesn't move them into the system.
You've need to copy the crontab.conf over, then add or remove a fake one to re-enter them all into the new user.

John
 
Well I spoke to soon on the script working perfectly. Here are some issues I had.
I moved domain3 from the user admin to a new user3. All the mail folders were there but when they users logged into webmail, their mailboxs were empty.

Second issue.

I created a new Administrator (admin2) and created a user (user5) under the reseller tab for admin2 then i did ./move_domain.sh domain5 admin user5. The website worked but the users were unable to receive emails via pop. Not sure about webmail on this part.

Third: i did ./move_domain.sh domain7 admin admin2. The users were unable to receive email, and the domain would not show. It only went to the apache ssl is installed correctly page.

I transfered all the domains back to admin and all users were able to receive email. This seems to be the issue with moving domains from one admin to anything in a second admin. Maybe the move_domain script is not for that. Not sure about the user that had all mailboxes in webmail but no old mail. that was just transfered from admin to a user under the admin reseller tab.

On the domains that were moved to a admin2 user, I did see new mail files in the imap directories that were created for those new users. Not sure why the users could not download the mail.

Hope this is not to confusing for anyone to understand.
 
after moving domains to new users, users were unable to receive email. move domains back to original locations but having issues copying new mail back. The mail was received by the system in the new location, but the users were not able to download it or view it in webmail.

old location: /home/admim/imap/domain1.com/user1/Maiddir/new
new location: /home/account1/imap/domain1.com/user1/Maildir/new

copied the new location back to the old location and chown to the correct user:group. But the mails is still not showing up in the users mailbox.

Anyone have any suggestions?
 
Hi,
I've use the script :

/usr/local/directadmin/scripts/move_user_to_reseller.sh


for move one user from one reseller to another. But the IP address still to assign to the old reseller, and I cannot change it.

Ho to resolve it ?



Thank you in advance
 
Back
Top