Mounting Mac OS X Disk Images with Shadow Files

Mount with Shadow:

hdiutil attach -owners on original.dmg -shadow

Unmount:

hdiutil detach /dev/disk#

Commit changes:

hdiutil convert -format UDZO -o new.dmg origianl.dmg -shadow