/etc/userdomains how frequently is it updated, contains all domains?

postcd

Well-Known Member
Oct 22, 2010
717
19
68
Hello,

i found there is usefull script /scripts/whoowns domain.name

Which returns cpanel username who owns the domain

That script contains link to /etc/userdomains which contains like:
username1: domain.name
uisername2: domain.name2

i wanted to ask if that /etc/userdomains is always up to date and if it really contains all domains?

Im asking because if i remember correctly (i may not) I think that when i accessed WHM / Account information / List Subdomains
i could not find some domain even it was hosted on the server

I also used /usr/local/apache/domlogs/$cpanelusername/ as a source for the user domains, but there im also not sure if it contains everything, probably not

/etc/userdomains appears to be better way to get user domains:
grep ": cpanelusernamehere" /etc/userdomains | cut -d: -f1

Thx
 
Last edited:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
i wanted to ask if that /etc/userdomains is always up to date and if it really contains all domains?
Hello :)

Yes, this file is updated whenever a new domain name is added, and it includes all of the domain names on your system.

Thank you.