Re: Correct method to change domain account's /home/username path to existing usernam
Hello,
If you just wish to show the data at /home/domnet when accessed
http://www.domain.com/ through webbrowser and vice versa , just interchange the DocumentRoot for both domains in
"/etc/httpd/conf/httpd.conf"
eg :
Originally
<VirtualHost **.**.**.**:80>
ServerName domain.com
DocumentRoot /home/domcom
Change It To
<VirtualHost **.**.**.**:80>
ServerName domain.com
DocumentRoot /home/domnet
Same should be done for "domain.net" change its DocumentRoot to "/home/domcom".
Note : Here we have just asked apache server to pick the files from the new location when the URL is requested, so the username and password as well as access rights for both users account will remain the same, as ideally user domcom will not be having access to "/home/domnet"
If you want to avoid this and do hardship once rather then keep remembering such settings in future.I'll suggest you to please change one of your account's username to any dummy username via
modify account in WHM
Suppose if we change the username of account "domain.com" to test.
Now generate full backup of both the accounts.
For this Login to the server via SSH with root privileges and use the script
# /scripts/pkgacct test --force
&
# /scripts/pkgacct domnet --force
This will generate the backup of both accounts in tar.gz formate.
Now Terminate the account "domain.com" from "Terminate an Account" in WHM.
Once done first change the username of the account "domain.net" to domcom.
Now restore the account "domain.com" using the script
# /scripts/restorepkg test
Remember we've changed the username of this account to test.
Now "domain.com" will be having username test, change it to domnet and you are done.