Something Different In Linux

Home » cpanel » change reseller ownership

change reseller ownership

Posted by Rishikesh Vispute Categories: cpanel, How to

How to change the reseller ownership from one reseller user to another reseller user by using SSH


If you want to change the reseller ownership means the old reseller is “test” and you have created new account with the user name “indian” and you want to move all the domains which is under the reseller “test” to “indian” then you need to change the ownership of all the accounts manually by using reseller center but you can easily change the reseller ownership by using following script.

Suppose :

Old Reseller Username = test

New Reseller Username = indian

1) First you need to find out the user name which is under the old reseller ( test) account by using following command

cd /var/cpanel/users

grep "OWNER=test" * -R | awk -F: '{print $1}' > user_name

cat /var/cpanel/users/user_name

It shows all the user name which is under the old reseller account.

2) Then create script file

vi /var/cpanel/users/

Then enter the follwoing code

for user in `cat user_name`
/usr/bin/replace 'OWNER=test' 'OWNER=indian' -- /var/cpanel/users/$user

Save the file

chmod 755 /var/cpanel/users/

sh /var/cpanel/users/


Now login to your new reseller account and check all the accounts.

Note : Please replace the “test”= Old reseller name and “indian”= New reseller username

2 Responses so far.

  1. Nyoman [D] says:

    I got quick way to change owner/reseller, based on your how to

    cd /var/cpanel/users
    perl -pi -e ‘s/OWNER\=test/OWNER\=indian/g’ *

    Now all account on test will change under indian reseller

Popular Posts

remove index.php fro

How to remove index.php from url in magento Ans : If you ...

PHP-Java bridge on p

  What is php-java bridge? The php-java bridge is the php ...

Set expiration for y

If you want to set the expiration to your site ...

Warning: Parameter 1

Error: Warning: Parameter 1 to modMainMenuHelper::buildXML() expected to be a ...

domain pointing to e

If you domain uses external MX record and it is ...