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.

batch dns editing

Discussion in 'Bind / DNS / Nameserver Issues' started by cyanide, Sep 14, 2005.

  1. cyanide

    cyanide Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Toronto, Canada
    I have a resellers with lots of domains/accounts. When ever I copy a reseller to another server, the accounts always take on the nameserver and ip address of the server and not the reseller.

    a ) Do you know if there is a way to force these accounts to keep the nameservers
    b ) Or do you know if there is a quick way to edit the dns for these accounts back to the reseller's nameservers.

    If I have to edit the dns zone manually through WHM for each account, it will take me quite a while.
    Just wondering if you knew any tricks to speed it up?

    thanks
     
  2. Zaf

    Zaf Well-Known Member

    Joined:
    Aug 22, 2005
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    You could use the replace command from SSH.
    $ replace stringA stringB -- /var/named/*
    The above command will replace the stringA with stringB for all the files in that directory. Hth
     
  3. cyanide

    cyanide Well-Known Member

    Joined:
    Aug 11, 2003
    Messages:
    106
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Toronto, Canada
    I think that's the ticket.

    Thanks for your reply
     
  4. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    However, you should also increase the SERIAL number in each zone file when you do that otherwise you can cause serious propagation issues.
     
Loading...

Share This Page