Merging 5 users into admin on a Personal License

SmaragdnaDolina

Verified User
Joined
May 6, 2020
Messages
39
Hello.

Before posting a new thread on this, I searched the forum high and low on this issue and I did find some info, but not enough.

I may well make a mess of it if I try to do this manually before checking more details.

I had a "regular" license for years on my VPS, so the way I self-learned to accommodate multiple domains for different websites was with individual users.

A couple of years ago, my provider told me I could shift to a Personal license if I had up to 10 domains and get it for free with my VPS package.

For my small needs it's more than enough (what I payed for was overkill).

BUT

I had not really understood the different structures between what I had and the Personal license.

So now I am stuck with the error of having 5 excess users, and I need to merge them into admin.

I have read the instructions in the DA documentation and some threads here on the forum. But I am far from sure that I have a clear idea of how to go about it.

What I need to transfer are a series of Wordpress installations, a couple of phpBB forums, the mySQL databases for them, and a series of email accounts.

Not so much stuff nor terribly complicated. But some of the domains are filtered through CloudFlare.

The "admin" user is not empty, it is connected to a functioning domain name and has WP and other stuff installed. So one of the merge modes that I have found is not usable.

Before I erase the 5 excess users, I should use the script to transfer the domains, if I understand right. The mySQL databases should be restored manually (that I can do, I have backups).

Am I missing still something?

Thanks for your help.
 
Hello,

Am I missing still something?

In general are the steps correct. You might be missing a security aspect. If WP or phpBB gets hacked the other sites might suffer too. So you might check and make sure you use up to date PHP applications.
 
I suspect there is a php mailer hack on a WP installation, another reason why it is urgent I get my server back in shape.

I have only a very rough understanding of the architecture of DA and Unix (my VPS has Debian), so I can move around and do quite a few things by myself, but I could easily mess up a complicate operation like this one.
 
Am I missing still something?
Be aware that you can give the users seperate FTP access which they probably need, but probably you have to give them the service to create email addresses because they can't have seperate logins to Directadmin if I'm correct.

@zEitEr is that still correct, or can logins to seperate domains be limited to a domain with login keys nowadays?
 
There is no need for separate logins because I am the only person working on the server.

If I had built the structure from the start with 1 admin owning all domains, now I would not have to wonder how to rebuild everything.

I was even thinking of using another panel like Webmin/VirtualMin, if they could simply function "plug and play" style, i.e. having another panel reading the backend correctly.

I'm afraid it is not so simple, is it?
 
I don't know, maybe virtualmin or usermin or centos-webpanel can be used to. But I never used them myself (except for webmin for other things) and I don't know about security.
So it might not be so simple, but I can't say for sure since I didn't use them.

For the price of the personal license I wouldn't even consider another panel. The personal license will disappear in favor of the personal plus license later this year. But everyone having a personal license at that time can keep it as log as payment is done.
 
I was wondering if some of you here would have the patience to follow me step-by-step.

Several people are interested in this, as I have found out while searching the forum for information before asking.

I only have 5 users (each with its domain), so it is not a giant task. And relatively little stuff installed for each user.

The first doubt I have is: what exactly to backup (* I can only use the system backup function now, from DirectAdmin), and how to restore it.

Or better, if I use the script to transfer the domains, what exactly will be moved from user1, user2 etc., to admin?

Before I erase the 5 users.
(* after lining up their backups, clearly)
 
Hey, it seems you are under doubts on how to complete the task successfully. Everything is rather simple. Use the script for moving domains /usr/local/directadmin/scripts/move_domain.sh

Usage:

Code:
/usr/local/directadmin/scripts/move_domain.sh <domain> <olduser> <newuser>

You will need address MySQL databases:

1. create a new DB
2. copy content from the old DB into new DB

Update settings of your PHP applications to connect to new DB.

Test everything you want, and remove old DBs and users as soon as you are 100% sure everything is working fine.

That's it.
 
I am wondering whether I need to repoint my domains?

Perhaps not, at the moment they all point to my IP anyway.
 
DirectAdmin when you use the mentioned script will do everything which is required for the exception of SQL DB stuff. You will get all the DNS records, emails, FTP accounts and so on moved to another user. And if you need to change an IP you can do it later or before the move.
 
Thanks.

No, I do not need to change my IP. I have been on one IP all these years anyway.

I point all my domains to it with A records and they resolve without problems. A couple of them are filtered through CloudFlare (I have to do the modification for a newer one), but no problem there, I have just modified the NS to use those by CloudFlare.

And I should not have any problems moving the mySQL databases manually.

Ok, I think I will just make sure that I have everything backed up and take the plunge.

Do I need to remove the users manually from within DirectAdmin after running the script from command line?
 
Meaning: the script will not do that for me, will it?

Users in directadmin are allowed to host numerous domains. It would be absolutely wrong if the script removed an user after moving a single domain.

The question was, do I have to?

That's up to you whether you have to or don't have to remove users. Why do you ask me about it? If you want to fit into the license, then users should be removed.
 
I am asking about removing the users manually after running the script to transfer the domains.

My scanty tech knowledge means that I am not sure what gets moved.

"Users" are structured containers with data.

"Moving" via the script is something like moving a directory or creating a duplicate?

= the "users" that are left are just empty containers, labels or? I need to know because I must also check if I have enough server space for all the data.

I know I need to remove them to align with the license, that is the reason for the whole operation.
 
The best way to see how the script works is to run it:

Code:
/usr/local/directadmin/scripts/move_domain.sh <domain> <olduser> <newuser>

Here in directadmin is everything rather straightforward. The script is used to move domain from one user to another, and its name says that literally. It moves a domain, it does not clone the domain, it does not remove users. It does not reinstall Directadmin either, and does not even order a pizza to your office :) It does only what it says. Do we have a translation issue probably...

You might try the script. And everything gets clear. Why so many questions about the same?
 
You could order a pizza for me.....

But I am baking one already, while yours would get cold by the time it reaches me
;)


It's more efficient to keep asking questions until I get a clear picture than to mess up the whole server and waste days fixing it.

You don't need to keep answering me if you got bored; someone else will :cool:


:cool:
 
He isn't bored, he doesn't understand what is not clear to you, neither do I. ;)

As he said, the script does what it says, move domains (so -not- users)! Which is the reason why the user will be kept in place, because a user can have multiple domains. Which zEitEr also already explained.

So no copy is made, the domain and it contents (except database) will be moved to the new user.
Disk usage will remain the same, just another user (the one you moved the domain to) will use it now.

= the "users" that are left are just empty containers, labels or? I need to know because I must also check if I have enough server space for all the data.
If all domains are moved from them, then they almost are empty containers. As said, you first have to move the mysql databases, because if you delete the user before you do that, you will loose the database content.

So:
1.) Use the command, move all domains to another users (you want to admin if I understand correctly)
2.) Make a backup of all databases from alle the users you want to delete
3.) Create new databases in the admin account and import the backups in there
4.) Change the configs of the domains who are using databases, so the new database and database user will be used (and if you did not use old credentials, also new database password.
5.) Wait until DNS has synced and check if all sites are working with the databases as they should.
6.) Doublecheck that everything is gone under the old users
7.) Delete the old useraccounts.

That's all.
 
Back
Top