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.

How can possible edit all domain names at once?

Discussion in 'General Discussion' started by Eric L, Aug 15, 2003.

  1. Eric L

    Eric L Member

    Joined:
    Apr 6, 2003
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    How would this be possible to have every domain name edited (based on what wwwacct does) without changing any values of the domain name?

    I have edited the file wwwacct based on what I need and I would need to have those new settings applied to almost 200+ domain names.

    Like in Enxim, we can simply write a shell scripts to call the command EditVirtualDomain. How would be able to get around this in Cpanel?

    Those new settings are basically related to DNS; such as adding a new entry for secondary mail server in all existed domain names and some other customized work.

    Could anybody shed some lights?

    cPanel.net Support Ticket Number:
     
  2. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    Your speaking about a bunch of things all smashed together. Do you want to actually edit the domain names on file or just make changes to zone files, etc?

    cPanel.net Support Ticket Number:
     
  3. Eric L

    Eric L Member

    Joined:
    Apr 6, 2003
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Right now I just want to change the DNS zone of each domain name.

    cPanel.net Support Ticket Number:
     
  4. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    What would you like to do to the zone file?

    cPanel.net Support Ticket Number:
     
  5. Eric L

    Eric L Member

    Joined:
    Apr 6, 2003
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the prompt reply.

    I would need to add a secondary MX record for each domain name:

    linux.net. 14400 IN MX 50 backupmail.linux.net.

    And an A record for it.

    backupmail 14400 IN A <some_ip>

    cPanel.net Support Ticket Number:
     
  6. ciphervendor

    ciphervendor Well-Known Member

    Joined:
    Aug 26, 2002
    Messages:
    1,052
    Likes Received:
    0
    Trophy Points:
    36
    A bash file like this should work well:
    Code:
    #!/bin/sh
    
    cd /var/named/
    
    for file in *
    do
    
    echo "linux.net. 14400 IN MX 50 backupmail.linux.net." >> $file
    echo "backupmail 14400 IN A <some_ip>" >> $file
    
    done
    exit
    Just be sure to make a copy of named.ca to say /tmp and then restore it once you've completed the above. The same goes for any files you don't want to modify. Alternatively you could also change the attributes to +i.

    cPanel.net Support Ticket Number:
     
Loading...

Share This Page