Skip to main content

get owner username from command line using domain name

Comments

8 comments

  • kernow
    You could just do a locate domain.com which would give you a few locations one of which would be /home/username/domain.com locate domain.com
    0
  • craigedmonds
    [quote="kernow, post: 1486852">You could just do a locate domain.com which would give you a few locations one of which would be /home/username/domain.com locate domain.com

    cool. that gives ALOT of paths. ALL i need to do now is parse them and I will be able to get the owner username. Thanks!
    0
  • quietFinn
    How about: [QUOTE] grep "somedomain.com" /var/cpanel/users/*
    0
  • yapluka
    Even simpler : /scripts/whoowns yourdomain.com
    0
  • quietFinn
    [quote="yapluka, post: 1486912">Even simpler : /scripts/whoowns yourdomain.com
    I wonder if there is a complete list of those scripts, this obviously is not: [url=http://docs.cpanel.net/twiki/bin/view/AllDocumentation/WHMDocs/WHMScripts]WHM Scripts
    0
  • Sys Admin
    "cat /etc/domainusers|grep domain.com" should work.
    0
  • cPanelMichael
    Hello :) Yes, the following script should work for you: /scripts/whoowns $domain
    You could also search for the domain name in the /etc/userdomains file. EX: grep $domain /etc/userdomains
    Thank you.
    0
  • craigedmonds
    [quote="cPanelMichael, post: 1487291"> Yes, the following script should work for you: /scripts/whoowns $domain
    You could also search for the domain name in the /etc/userdomains file. EX: grep $domain /etc/userdomains
    Thank you.
    Those work perfect thanks!
    0

Please sign in to leave a comment.