Yeah, it’s possible to sort out all associated domains (Subdomains, Addon-domains and Parked-domains) for a cPanel account via command line.
This will be helpful for server admins to sort out all associated accounts simply and quickly from the command line.
In a cPanel server, there is a file “main” in “/var/cpanel/userdata/$username” (where $username is the actual username) which stores all accounts details associated with it. From there you can see all the domain associated with that particular cPanel account.
Please see the sample output pasted below:
1. Log into server as root.
2. View the file as I mentioned.
root@server10 []# cat /var/cpanel/userdata/test123/main
---
addon_domains: {}
cp_php_magic_include_path.conf: 0
main_domain: test123.com
parked_domains: []
sub_domains:
- sub.test123.com
---
Where test123.com is the domain name and test123 is the username.
How to change main domain of a cPanel reseller account with an existing domain name?
Hey!! Here are some tips on cPanel reseller account modification.
It’s quite simple if the new domain you wish to set as primary of your WHM re-seller is not under the same account. It can be simply managed from the “Modify an Account” section. You can simply modify the account information from this location. As it is a re-seller, you must do the following steps after modifying the account.
You can also list this from the WHM.
1. Log into WHM panel.
2. Under “Account Information” tab,
>> List Parked Domains – To list all parked domains with original domain details.
>> List Subdomains – To list Subdomains, Addon Domains and Parked Domains.
If you have only the cPanel access, then follow these steps to list them:
1. Log into cPanel.
2. Uder “Domains” tab you will get all associated accounts.
>> Subdomains
>> Addon Domains
>> Parked Domains
That’s it!!
Related posts:
1, How to change main domain of a cPanel reseller account with an existing domain name?
2, The XCache – Simple way to install Xcache from source code
3, How to check cPanel rpm works or not – cPanel script to check rpm
4, Simple steps to install CloudFlare plugin on cPanel server
Wonderful informative stuff thanks for sharing. I don’t need that, but good to have some knowledge about it.
You’re welcome, Asma 🙂
Hello Arun,
I am new to this Stream so want to know from you whether your above process of a domain is same for all servers hosting providers or not?
Regards,
Brijesh
Not for all. It’s for cPanel based server.