How to Update a file on all zones at the same time

I recently modified /etc/default/passwd on all of my global zones after changing entries enforce length and complexity of passwords on Solaris systems. I wanted a quick way to copy this updated configuration to all child zones.

A simple one-liner does the trick on each global zone:

# zoneadm list | grep -v global | \
  while read zone
  do
     cp -p /etc/default/passwd /var/zones/${zone}/root/etc/default;
  done

NOTE: The above command assumes all your zones are in the /var/zones zonepath.