finding which hosting account/reseller a domain belongs to thru ssh

niceboy

Active Member
Sep 29, 2011
41
1
58
cPanel Access Level
Root Administrator
Hi,

This is the situation..

Code:
xxxxx <- reseller user
   |
  yyyyyy <- cpanel user account
       |
      testaddon.com <- addon domain
As you can see above, we have an addon domain(testaddon.com) inside a cpanel account(yyyyyy) which belongs to a reseller customer(xxxxx)

Now thru SSH, is there any command ( or a small script ) which takes the addon domain name and displays..
1. which cpanel account the addon domain belongs to and
2. under which reseller account the cpanel account/addon is created/used.

Thanks for help.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,201
363
Hello :)

You can find the account ownership of a domain name with a command such as:

Code:
/scripts/whoowns $domain
Or via:

Code:
grep $domain /etc/userdomains
You can then search for the username in /etc/trueuserowners to see which reseller owns the account. EX:

Code:
grep $username /etc/trueuserowners
Thank you.
 
  • Like
Reactions: luissquall