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.

Master Domain Account

Discussion in 'General Discussion' started by blackram, Nov 6, 2006.

  1. blackram

    blackram Registered

    Joined:
    Nov 6, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I'm new to WHM/CPanel so I'm sure that I'm missing something blindingly obvious.

    Basically I've set up the server with the hostname web1.mydomain.com and configured it as the primary name server for the domain (ns1.mydomain.com). I've then configured WHM, added a couple of accounts and it seems to be working OK. However I want to add an account for mydomain.com so that I can manage email accounts etc for this domain through CPanel, but when I try to do so it informs me that a zone for this domain already exists (which it obviously does as I had to create it when configuring the server) and aborts. Is there an easy way round this?
     
  2. krava

    krava Well-Known Member

    Joined:
    Sep 23, 2003
    Messages:
    149
    Likes Received:
    0
    Trophy Points:
    16
    cPanel Access Level:
    Root Administrator
    Hello,

    You need to change the hostname of your box or delete the DNS zone of web1.mydomain.com and then try to create the account again. You can remove the DNS zone via WHM using "delete DNS zone". Once the account is created, edit the DNS zone of mydomain.com and add "edit DNS zone" all necessary records for your hostname and nameservers.
     
  3. blackram

    blackram Registered

    Joined:
    Nov 6, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Thanks krava, that's basically what I did in the end although I had a little more work to do in removing references to the user that had been previously created ie.

    • If you have already tried to add an account then first remove the user entries from these files: /etc/passwd, /etc/groups & /etc/userdomains
    • Edit /etc/localdomains and remove line(s) referencing domain
    • Edit httpd.conf (in /usr/local/apache/conf) and enter a # before for domain's <virtual host ...> records
    • Restart Apache i.e. service httpd restart
    • Backup DNS configuration and zone file for your domain (ie. /etc/named.conf & /var/named/<your domain zone file>
    • In WHM, create an account as you require for your domain e.g. domain.com but use a variant for the domain name e.g. domain2.com
    • Edit DNS configuration file (/etc/named.conf) and change domain zone reference to something different e.g. xdomain.com.
    • In WHM, modify the account and change the domain to the original e.g. domain2.com to domain.com
    • Edit DNS configuration file (/etc/named.conf) and remove new domain zone reference and rename original e.g. xdomain.com back to domain.com. (most people probably wouldn't need to do this but in my case there were a couple of entries in the original which I needed which were slightly different). If doing this then need to change the serial no. of the original zone file to be greater than the new one so that the secondary is updated.

    I am new to WHM/CPanel but it does seem like a bit of a hack to do something that is fairly fundamental.
     
  4. xyber13

    xyber13 Well-Known Member

    Joined:
    May 30, 2006
    Messages:
    63
    Likes Received:
    0
    Trophy Points:
    6
    Editing of DNS Zone

    Blackram,

    What you have to understand is this. You are a reseller right? You have the WHM. However, with your WHM you are only able to edit your customers' account. Your Account is controlled by your host. This is a similar concept with your clients. They have to contact you to modify the DNS zones. So, for your own account, you have to consult your host. I know this is rather inconvenient, but that is how it is.

    -Xyber.
     
  5. blackram

    blackram Registered

    Joined:
    Nov 6, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    No Xyber, we are not a reseller, this is our own server. Scanning the forums others have encountered this as well. Its obviously happened in this case because we had configured DNS manually for the domain to set up the primary name server prior to configuring cpanel. I guess the way to approach it in future from a cpanel point of view would be for the server to have a temporary hostname, configure cpanel, setup account for domain, configure DNS on domain and change hostname.
     
Loading...

Share This Page