Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Global Editing; Must be a way!

Discussion in 'General Discussion' started by dgtech, Aug 21, 2004.

  1. dgtech

    dgtech Member

    Apr 5, 2002
    Likes Received:
    Trophy Points:

    We have gone through a DedicatedNow IP migration, of which failed misarabliy for us. We are now stuck changing around 600 domains names IP's and resold domains name servers, and this will not be a pretty job. This is also causing our customers to be down.

    Here is what I am asking. Is there a way to globally edit resellers resold accounts to input the resellers nameservers and also a way to globally edit the IP's of domains so that we do not have to move them all to the correct main shared IP?

    After looking at a few files, it appears to me a very simple task for a script.

    For Nameservers:

    It would first open the /var/cpanel/resellers-nameservers, find the reseller's username, and then go through the account list and find all domains owned by that reseller, and change their nameservers. Then find all of the addon/parked domains for that resold domain (via httpd.conf or some other means) and change their ns too, so that they match the resellers nameservers. Perhaps even a manual selection of resellers to change the DNS.

    For IPs:

    It could locate all domain names owned by a reseller, and then you manually select an ip to change it to or it will automatically change the resold domains to the shared IP. You could even select the IP's it's self, and simply go through the same process as "Change Site's IP Address."

    I would greatly appreciate any help on this.

  2. zentity

    zentity Well-Known Member

    Jun 16, 2004
    Likes Received:
    Trophy Points:
    You can try this and modify it for your needs, I made it to change resellers IP's and their accounts ips when moving them to other servers, you could add the httpd.conf bit too - Its pretty straight forward.

    I wrote it in a hurry one morning and haven't updated it for a while with more functions or cleaner code checking.. since it works for what i wanted it to do :) < edit: just made a slight change that will do addon domains and parked domains too. / edit>

    To change the IP's in apache, I would build a new httpd.conf and Include it within httpd.conf rather than add it directly, till all your accounts are done.

    If you modify the dns ips and also the ips in /var/cpanel/users/* you should be able to run

    /scripts/rebuildhttpdconf > to get the apache config.. maybe that will work :)

    I could script this if needed on the fly.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #2 zentity, Aug 21, 2004
    Last edited: Aug 21, 2004

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice