The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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

Discussion in 'General Discussion' started by niceboy, Oct 6, 2013.

  1. niceboy

    niceboy Active Member

    Joined:
    Sep 29, 2011
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  2. niceboy

    niceboy Active Member

    Joined:
    Sep 29, 2011
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Please any one can help on this?
    thanks.
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,694
    Likes Received:
    654
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    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.
     
  4. niceboy

    niceboy Active Member

    Joined:
    Sep 29, 2011
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Great. thanks :)
     
Loading...

Share This Page