{"id":1967,"date":"2021-09-17T05:57:37","date_gmt":"2021-09-17T05:57:37","guid":{"rendered":"https:\/\/ownwebservers.com\/kb\/?p=1967"},"modified":"2021-09-17T05:57:37","modified_gmt":"2021-09-17T05:57:37","slug":"how-to-find-out-reseller-name-with-domains","status":"publish","type":"post","link":"https:\/\/ownwebservers.com\/kb\/how-to-find-out-reseller-name-with-domains\/","title":{"rendered":"How to Find out Reseller Name with Domains?"},"content":{"rendered":"<p>Through Reseller you can earn unlimited benefits online and if you wish to list all cPanel hosting accounts under a specific reseller, then you can refer to the shell script as given below.<\/p>\n<p><strong>Step 1:<\/strong>\u00a0Create the file\u00a0<strong>reseller.sh<\/strong> and add the code as follow.<\/p>\n<pre>vi \/home\/reseller.sh\r\n\r\n#!\/bin\/bash\r\nusage()\r\n{\r\necho \"Example : $0 domain.com or username\"\r\nexit 1\r\n}\r\n\r\ntest $1 || usage\r\nUSERN=$(grep $1 \"\/etc\/userdomains\" | awk '{print $NF}' | awk 'NR==1')\r\n\r\nif [[ -z $USERN ]]\r\nthen\r\necho -e \"e[1;33m $1 is not a reseller e[0m\"\r\n\r\nexit 1\r\nfi\r\n\r\nOWNER=`cut -d: -f1 \/var\/cpanel\/resellers | grep -o $USERN`\r\nexitstatus=$?\r\n\r\nif [ \"$exitstatus\" == 0 ] ; then\r\necho \"\"\r\necho -e \"e[1;31m Below are the accounts associated with the reseller $name e[0m\"\r\necho \"\"\r\n\r\noutput=$(for i in `grep $OWNER \/var\/cpanel\/users\/* -l` ; do grep USER= $i ; done | awk -F\"=\" '{ print $2 }')\r\necho -e \"e[1;33m $output e[0m\"\r\nelse\r\necho -e \"e[1;35m $1 is not a Reseller e[0m\"\r\nexit\r\n<\/pre>\n<p><strong>Step 2:<\/strong><\/p>\n<pre>\u00a0chmod 755 \/home\/reseller.sh&gt;\/pre&gt;\r\n<\/pre>\n<p><strong>Step 3:<\/strong><\/p>\n<pre>\u00a0cd \/home\/<\/pre>\n<p><strong>Step 4:<\/strong><\/p>\n<pre>root@server[#] .\/reseller resellerusername<\/pre>\n<p>or<\/p>\n<pre>root@server[#] .\/reseller resellerdomain.com<\/pre>\n<p>After executing the script you will get the below output as::<\/p>\n<pre>root@server[#] .\/reseller yourdomainname.com<\/pre>\n<p>Below are the accounts associated with the reseller<\/p>\n<pre>Jhon\r\n\r\nBacro\r\nMice<\/pre>\n<p>or<\/p>\n<pre>root@server[#] .\/reseller newtest\r\nnewtest is not a reseller.<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Through Reseller you can earn unlimited benefits online and if you wish to list all cPanel hosting accounts under a specific reseller, then you can refer to the shell script as given below. Step 1:\u00a0Create the file\u00a0reseller.sh and add the code as follow. vi \/home\/reseller.sh #!\/bin\/bash usage() { echo &#8220;Example : $0 domain.com or username&#8221; [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-1967","post","type-post","status-publish","format-standard","hentry","category-reseller-hosting"],"_links":{"self":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1967","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/comments?post=1967"}],"version-history":[{"count":1,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1967\/revisions"}],"predecessor-version":[{"id":1968,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/posts\/1967\/revisions\/1968"}],"wp:attachment":[{"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/media?parent=1967"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/categories?post=1967"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ownwebservers.com\/kb\/wp-json\/wp\/v2\/tags?post=1967"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}