With 10.6 and now 10.7 the following Preference Panes are locked by default. Meaning you need an admin username and password to unlock them: Security & Privacy, Print & Scan, Network, Sharing, Users & Groups, Parental Controls, Date & Time, Software Update, Time Machine and Startup Disk. As a ‘Standard User’ you can’t unlock these panes.
In 10.6 we could do the following to the /etc/authorization file, to give a standard user semi-admin access to the Preference Panes.
<key>system.preferences</k
<dict>
<key>allow-root</key>
<true/>
<key>class</key>
<string>user</string>
<key>comment</key>
<string>Checked by the Admin framework when making changes to certain System Preferences.</string>
<key>group</key>
<string>everyone</string> * Changing this from 'admin', to another local group. i.e. staff, everyone, or a custom group you created yourself.
<key>shared</key>
<true/>
</dict>
This unlocks the majority of the preference panes above, the downside being you probably don’t want them all unlocked. (i.e Startup Disk) For some this was acceptable and used. Some of us however just wanted a few unlocked, i.e. Date & Time for laptop users who travel a lot. Time Machine, so staff could connect to a Time Capsule or USB Hard Drive at home. Energy Saver so they could adjust the settings to their liking. etc…
With 10.7 / Lion the /etc/authorization has undergone some changes and has much more granular control available in it. Making locking or unlocking individual Preference Panes possible! (Yes TimeMachine)
Before you start make a copy of the authorization file. If you make a wrong edit your machine will get stuck and the spinning cog on boot. You can restore from your backup by booting into Single User mode (Command + S on boot) & trashing the messed file and renaming your backup. You can also edit the file from this mode, use ‘sudo mount -auw’ then, cd etc, ‘sudo pico authorization’ at the command line. Find the bit you messed up fix it and save and reboot.
So open up the /etc/authorization file (Finder, Go to Folder, /etc), I’d recommend using TextWrangler to edit it. In general you are going to be searching for a <key> key-name </key> and then editing the very end section of the key / dict entry. From this, to this:
<string>__APPNAME__ <removed the asian characters that were here for this article></string>
</dict>
<key>group</key>
<string>admin</string> ** Change admin to another local group that your user is in. i.e. staff, everyone etc...
<key>shared</key>
<false/>
* Standard Users when created are automatically put into the “staff” group. ”Admin” users are in the “staff” and “admin” groups
Save the file and reboot your Mac.
To unlock the Systems Preferences in General so all changes below will actually work you first need to edit this top level key. <key>system.preferences</k
to Unlock the Security & Privacy Pane – search for the following key <key>system.preferences.se
First time round it was ‘is trying to unlock Sharing preferences’, 2nd time its ‘modify an encrypted disk’. So go back to the etc/authorization file and search for this <key>com.apple.DiskManagem
<dict>
<key>en</key>
<string>__APPNAME__ is trying to modify an encrypted disk.</string>
</dict>
<key>group</key>
<string>admin</string> *Change this to another local group: staff, everyone
<key>shared</key>
save and reboot. Login as your standard user, you can now get into the Security & Privacy pane.
Energy Saver – Unlockable by editing - <key>system.preferences.en
Print & Scan – Unlockable by editing - <key>system.preferences.pr
Network - Unlockable by editing - <key>system.preferences.ne
Sharing – Unlockable by editing - <key>system.preferences.sh
Users & Groups – Unlockable by editing -> <key>system.preferences.ac
</dict>
<key>rule</key>
<string>root-or-admin-or-a
</dict>
Parental Controls - Unlockable by editing <key>system.preferences.pa
Date & Time – Unlockable by editing <key>system.preferences.da
Software Update – Unlockable by editing <key>system.preferences.so
Time Machine – Unlockable by editing <key>system.preferences.ti
Startup Disk – Unlockable by editing <key>system.preferences.st
and then there’s some new Keys of interest in Lion, to investigate.
<key>system.install.app-st
<key>com.apple.SoftwareUpd
That’s my wrap up of the authorization file in Lion. Happy to try and answer any queries. Check out this article on my Blog - http://mattsmacblog.wordpr
Matt
by: mattosaur4 on 2011-08-02 at 19:40:34ID: 30244