This post is in response to a reader request.

Along with firmware updates, setting DVD region codes has long been considered one of those things that simply cannot be automated for sysadmins.  There are methods to flash a drive’s firmware, making it region-free, but that’s at the same time of questionable legality and a manual process.  The best solution I’ve found so far is to allow non-admin users to set the region code.  This is accomplished by modifying the /etc/authorization file.  Modifying this file requires root access.  Fire up your favorite command line text editor using sudo, or use a GUI text editor that requests admin credentials when editing privileged files (such as BBEdit).

Find the following block of text:

<key>system.device.dvd.setregion.initial</key>
<dict>
<key>class</key>
<string>user</string>
<key>comment</key>
<string>Used by the DVD player to set the region code the first time. Note that changing the region code after it has been set requires a different right (system.device.dvd.setregion.change).</string>
<key>group</key>
<string>admin</string>
<key>shared</key>
<true/>
</dict>

Change the line:

<string>user</string>

to read:

<string>allow</string>

This change will allow any user, whether or not that user is an admin, to set the optical drive’s initial DVD region code. As noted in the comment in the block above, this item only allows the user to set the region code for the first time. If you would like your non-admin users to be able to change the region code, add the section below to the /etc/authorization file.  If you allow this, keep in mind that Apple hardware has a built-in limit of five changes.  After making the fifth change, you’re stuck with that region code (though it is the author’s understanding that Apple Authorized Service Centers are equipped to reset the drive’s firmware if you find yourself in this position).

<key>system.device.dvd.setregion.change</key>
<dict>
<key>class</key>
<string>allow</string>
<key>comment</key>
<string>Allows any user to change the DVD region code after it has been set the first time.</string>
<key>group</key>
<string>admin</string>
<key>shared</key>
<true/>
</dict>

The /etc/authorization file can be modified using tools such as defaults or Plistbuddy, allowing this change to be scripted.  The file can also be packaged for distribution with tools such as the Casper Suite.  Be sure to set ownership to root:wheel and permissions to  read & write for the owner, and read only for group and everyone (644).

As with anything else, test, test, and retest before deploying such a change to a production system.