Make changes en mass [done]

Jeff Lightner jlightner at water.com
Tue Mar 24 19:41:57 UTC 2009


If all your zones have same value (e.g. 604800) for expire and nothing
else matches that value in the files you could do it fairly easily with
a for loop and sed:

For example if all your zone files were named with a .com at end of
name:

for zonefile in `ls *.com` 
do sed -e s/604800/709600/ $zonefile >${zonefile}.new
   mv $zonefile ${zonefile}.old
   mv ${zonefile}.new $zonefile
done

The sed would find the 604800 in the zone file and replace it with
709600.  You then have it send the sed output to a file with same zone
name with .new appended.  You then save the original zone file (for
backout planning) and finally move the new zonefile over the original.

TEST THE ABOVE IN AN ALTERNATE LOCATION FIRST!!!   



-----Original Message-----
From: bind-users-bounces at lists.isc.org
[mailto:bind-users-bounces at lists.isc.org] On Behalf Of John D. Vo
Sent: Tuesday, March 24, 2009 2:46 PM
To: jvo at eagle.net
Cc: bind-users at lists.isc.org
Subject: Re: Make changes en mass [done]

I used WinSCP and just select a bunch of files and edit command and 
copy/paste the "good' settings into the zone files.

-Thanks.

-John

John D. Vo wrote:
> Greetings:
>
> According to http://thednsreport.com, my "expire" time for my zones 
> are too short (recommended 2-4 weeks) and
> my SOA record is not good.
>
> Is there a tool that I can use to make changes to all my zones in one 
> swoop?
>
> Thanks,
>
> Solaris/Bind 9.2.2. (yes, it is ancient)
>
 

-- 
----

Best Regards,

John D. Vo
Eagle Teleconferencing Services, Inc.
Network-System Administrator
jvo at eagle.net
Office: (212) 200-2000 Ext. 105
Cell:     (212) 200-3016

---


_______________________________________________
bind-users mailing list
bind-users at lists.isc.org
https://lists.isc.org/mailman/listinfo/bind-users
 
Please consider our environment before printing this e-mail or attachments.
----------------------------------
CONFIDENTIALITY NOTICE: This e-mail may contain privileged or confidential information and is for the sole use of the intended recipient(s). If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.
----------------------------------



More information about the bind-users mailing list