Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.7: A look at /etc/authorization usage System 10.7
The /etc/authorization file in Mac OS X can be used to control access to the various panes of the System Preferences amongst other things. It's used by some of us Mac Sys Admin's to give Standard Users access to System Prefs panes that only admins could otherwise unlock. It can also be used in the reverse to lock down panes you don't want users messing with. An example by Apple was about allowing non-admin users to change the time zone setting. Often the panes can't be controlled to the exact level you may want via MCX (Local or Managed) or defaults write/plists. Nor do you want to give users admin rights in a large business/university setting.

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.
 <string>Checked by the Admin framework when making changes to certain System Preferences.</string>
  <string>everyone</string> * Changing this from 'admin', to another local group. i.e. staff,
everyone, or a custom group you created yourself.
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 Lion the /etc/authorization has undergone some changes and has much more granular control available in it. Which makes locking or unlocking individual Preference Panes possible.

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) and 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__ 正在嘗試解鎖"安全性與隱私"偏好設定。</string>
<string>admin</string> ** Change admin to another local group that your user is in. i.e. staff, everyone etc...
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.
read more (480 words)   Post a comment  •  Comments (3)  
  • Currently 3.83 / 5
  You rated: 3 / 5 (6 votes cast)
[13,616 views]  View Printable Version
10.7: Make Lion honor the DoNotSendSystemKeys default System 10.7
Lion seems to have broken the ability (or at least made it tremendously unreliable) to have Command+Tab only apply to the local machine when controlling another host via screen sharing. This hint offers a possible workaround.

Prior to Lion, in most OS X versions where screen sharing was supported natively (Leopard and later, I think), Command+Tab switching through apps on a machine controlling another host via screen sharing would only switch among running apps on the local machine. [crarko adds: That's actually not been my experience, hence the defaults setting mentioned below.]

This behavior has never been consistent however, and somewhere along the line, a default was introduced:

defaults write DoNotSendSystemKeys -bool TRUE

This allowed some user choice in the matter. This seems to have stopped working in Lion, but I have also noticed that sometimes the system spontaneously reverts to restricting Command+Tab to the local machine anyway, but often after a reboot, it's back to the behavior of Command+Tab going to the apps on the remote machine, with no (keyboard-only) way to get back out.

Quite by accident while this was happening, I happened to be looking at Activity Monitor, and noticed a process I hadn't seen before: RFBEventHelperd, owned by _ard (the screen sharing system user). On a whim, I tried killing it (it didn't hurt anything), and at once, my Command+Tabbing is happily only affecting my local machine again.

Note that you may need to enter the above defaults setting in Terminal for this to work. I haven't tried without it being set.

[crarko adds: I tested this, and it works as described. I also didn't notice any bad side effects from killing RFBEventHelperd, but if anyone does, please post them in the comments.]
  Post a comment  •  Comments (5)  
  • Currently 2.83 / 5
  You rated: 3 / 5 (6 votes cast)
[5,208 views]  View Printable Version
10.7: A warning about Finder's 'Replace' feature System 10.7
If you have a folder that contains a file with the same name, and drag the file into the same location as the folder, the Finder may try to delete both items.

To reproduce this:
  • Create a folder on your Desktop named 'test.'
  • Create a file in that folder also named 'test.'
  • Move the file from the folder onto your Desktop.
  • Click 'Replace.'
Result: Both the folder and the file are deleted.

Do the same sequence, except choose 'Keep Both Files.' Same result.

[crarko adds: Okay, this one half worked when I tried it in 10.7.3. With 'Replace,' both file and folder were indeed deleted. I also tried it with other items remaining inside the folder, and in that case everything inside the folder was also deleted. A potential disaster.

In the 'Keep Both Files' case, the folder was untouched and the file was renamed to 'test copy' when I moved it and 'test 2' when I copied it.

In any event, it's worth knowing that some potentially dangerous behavior is present in this function so there are no nasty surprises.]
  Post a comment  •  Comments (22)  
  • Currently 3.71 / 5
  You rated: 3 / 5 (7 votes cast)
[8,497 views]  View Printable Version
10.7: Update to a workaround for a Boot Camp x64 installation issue System 10.7
Yesterday I finally got around to dual-booting my MacBook, with a nice fresh copy of Windows 7. Everything was great, except for a laggy download of the Windows Support Software. So, earlier today, I got around to installing the drivers. It turns out, my old MacBook didn't support BootCampx64. I then did a quick search on how to fix this issue.

I came up with a number of answers, but this is an answer aimed at people who were in my situation which is:
  • I could not right click on the BootCampx64.msi file, because of the missing drivers.
  • Or if I could right click, then changing the properties of BootCampx64.msi resulted in not having the required elevated access privileges.
My solution (done from within Windows, obviously):
  • Without the drivers installed, you can still right click on the BootCampx64.msi file by click it with 'Shift-F10' which apparently acts as an alternate right click.
  • If you have the first step down, try opening the properties of the file, and change the compatibility to earlier versions of Windows.
  • If that still doesn't work, then open the start menu. Then go to Programs » Accessories » CMD, and hover over CMD.
  • Press Shift-F10, or right click if you are able, on CMD (the Windows Command Prompt).
  • Select the option in the drop-down menu, 'Run as Administrator.'
  • Then open CMD and get a shell window.
  • Now, when you open CMD, you should be running it as C:Windowssystem32.
  • At the Command Prompt, type in cd /d C:
  • You should now have C: at the far left of the prompt.
  • Type in cd Users. Then type in dir.
  • Find your username, and then type in cd username, e.g. cd John Smith
  • Continue the dir, cd process until you come into the directory in which the BootCampx64.msi is. (You may have dragged the WindowsSupport folder onto the desktop, or someplace else).
  • After you have reached the directory, simply type in BootCampx64.msi.
  • The program should start.
  • All of the drivers should start installing. You probably won't be able to move your mouse if you have a trackpad, as I do, because the Apple Trackpad driver is one of the last to be installed.
If it seems like the process is taking a while, be patient.


This earlier hint, this Apple forum thread, and this very helpful article.

[crarko adds: I haven't tested this one, as I don't use BootCamp. Reading this process reminds me why Windows desperately needs an equivalent to 'sudo' in its command prompt. If this procedure seems a bit confusing, take a look at the last article mentioned in the references, which has some screen grabs.]
  Post a comment  •  Comments (5)  
  • Currently 4.00 / 5
  You rated: 5 / 5 (5 votes cast)
[7,017 views]  View Printable Version
10.7: See Exposé view of an app in the background System 10.7
This is a feature that allows you to see the Exposé of an app that is in the background. You'll need a Trackpad.

In OS X 10.7, the four-finger swipe down toggles app Exposé for the app in the foreground. Except if you place the cursor on the icon of a running app in the Dock, in which case the four-finger down swipe toggles the app exposé of THAT app, not the application that is in the foreground.

If you swipe down again without selecting a window from the Exposé view, you are taken back to the app you were in before toggling Exposé.

[crarko adds: I'd love to test this, but my Lion system is still trying to finish installing the 10.7.3 update, which has already taken considerably longer than anticipated.]
  Post a comment  •  Comments (4)  
  • Currently 3.43 / 5
  You rated: 5 / 5 (7 votes cast)
[4,349 views]  View Printable Version
10.7: Auto-copy Photo Stream images to a folder System 10.7
To get the Photo Stream working on my MacBook I found out that I had to BUY an upgrade for an application that I don't want: iPhoto.

Looking for a solution I found that iPhoto stores its pictures in a specific location and the Photo Stream is updated even if iPhoto is not running. The goal was to create a script that copies all of the images from many sub-directories into a single folder.

As there are many people who know a lot more about OSX I would welcome improvements and feedback. Some areas to look at:
  • Using 'without replacing' which would only copy the missing pictures.
  • A Folder action which monitors changes and runs the script automatically.
Here's the script:
tell application "Finder"
  set this_folder to "Macintosh HD:Users:duittenb:Library:Application Support:iLifeAssetManagement:assets" as alias
  set target_folder to "Macintosh HD:Users:user:Pictures:MyStream" as alias
    duplicate (every file of the entire contents of this_folder whose name contains "IMG") to the target_folder with replacing
  end try
end tell

Replace the target_folder path (underlined above) with your actual destination folder. You can save the script as an application in your /Applications folder or to your Scripts menu.

[crarko adds: Note that you'll also need to modify the this_folder path if your boot drive isn't named 'Macintosh HD.']
  Post a comment  •  Comments (28)  
  • Currently 3.00 / 5
  You rated: 1 / 5 (5 votes cast)
[21,435 views]  View Printable Version
10.7: Fixing a stuck application in Mission Control System 10.7
I finally upgraded to Lion on my work computer and bid farewell to the wonderful Hyperspaces application. I used all 16 spaces and was loathe to make the jump to Mission Control.

After upgrading many apps were not respecting being assigned to specific desktops or to all desktops. At first I tried unassigning them in the Dock and reassigning them to their previous desktop or all desktops, but it didn't work.

Here is the solution I found:
  • If an app assigned to a particular desktop wasn't staying put, I had to assign it to all desktops, and then reassign it to desktop N.
  • If the app was not respecting assignment to all desktops, I had to assign it to a specific desktop, and then reassign it to all.
Apparently setting it to 'None' does not clear the previous assignment.

[crarko adds: I haven't tested this one.]
  Post a comment  •  Comments (3)  
  • Currently 4.00 / 5
  You rated: 4 / 5 (4 votes cast)
[6,131 views]  View Printable Version
10.7: Set default workspaces for applications System 10.7
Heavy users of Spaces from Mac OS X 10.5 and 10.6 may be wary of upgrading to Lion, as it's been completely replaced by Mission Control, which apparently does its own workspaces thing.

Well, actually, the workspaces in Mission Control are the same as the Spaces from (Snow) Leopard. The biggest difference is that they are now one-dimensional.

But the important thing is that application bindings to spaces still works, even though the preferences to set them have been removed from System Preferences. If you already had this setup from 10.5/10.6, the settings should transfer over to Lion. Even so, you may want to modify them given the new behaviors.

Here is a small guide on how to set this up. I'm sure there are commands that could make this easier, and I hope that commenters will supply them. Actually, my real hope is that someone will code up a GUI for doing this.

The settings are in the file ~/Library/Preferences/ You're going to want to open this in a good text editor, like TextWrangler. Note that Library is now hidden by default in Lion. A good text editor like TextWrangler will be able to browser hidden directories. If your favorite editor doesn't for some reason, you can open it with the Terminal command:

open -a YourTextEditor ~/Library/Preferences/

Replace YourTextEditor with the name of your actual text editor.

Once you have this file, you will want to edit the key workspaces-app-bindings. If you used Spaces in (Snow) Leopard, this should already exist. Otherwise, you will need to create it by adding:

somewhere in side the main <dict>. You may also need to add
above it (it's not clear to me, as I already had Spaces enabled).

Now, to add Application bindings, below the line, add lines like:
Here, the number in the tag is the space you want to add, and ch.sudo.cyberduck is the CFBundleIdentifier of the application you want, in this case CyberDuck. There is probably a better command to find this, but you can usually find the identifier by looking at the Info.plist file inside the application package (like Cyber and looking for the CFBundleIdentifier key.

As far as I can tell the old Spaces settings regarding the number of spaces have no effect in Mission Control. The number of spaces created is equal to the largest number of the spaces needed for open applications. So if you have application A mapped to space 3 and application B mapped to space 4, and you only have application A open, there will be three space created. But if you open application B, there will be four spaces. I haven't tested this thoroughly, so I may be wrong, though.

To make an application appear in every space, set the integer to 65544. This is a little glitchy in Lion (the application will not appear until you have finished switching spaces), but it works.

Finally, some tips. First, you will probably want to disable space rearranging in the Mission Control preferences. Second, full screen applications still create their own space (to the right of the allotted space). Third, you can setup Keyboard Shortcuts for the spaces in the Keyboard System Preferences, under the Mission Control section of the Keyboard Shortcuts tab. If you have a number pad, this can be a useful way of creating an illusion of two-dimensional spaces. Just pretend that the spaces are arranged like they are in your number pad. If you had Spaces from (Snow) Leopard, these settings will be transferred over automatically. It seems that you can set a keyboard shortcut for any space, as long as it is in existence, except for spaces for full screen applications.

[crarko adds: There are a lot of variables involved here, so be sure to have backups of the plist files before changing them.]
  Post a comment  •  Comments (9)  
  • Currently 1.93 / 5
  You rated: 1 / 5 (14 votes cast)
[10,879 views]  View Printable Version
10.7: StartNinja turns off the system start up chime System 10.7
StartNinja turns off the OSX Lion system start up chime / sound. It is a free utility that you can download here.

There are often times when I am in a public location and forgot to turn off the sound on my MacBook. Subsequently, a loud bong happens. Now there is a quick and easy solution for OSX Lion machines; StartNinja. StartNinja turns off the OSX Lion system start up chime/sound.

[crarko adds: Does what it says. There are some instructions on the download page. It's a useful utility if you need it.]
  Post a comment  •  Comments (11)  
  • Currently 3.83 / 5
  You rated: 3 / 5 (6 votes cast)
[10,164 views]  View Printable Version
iOS device headphones and your Mac System 10.7
Your iOS device's headphones with remote controls also start/pause/ffwd/volume change your Mac.

Plugging your iOS headphones (with remote control) into your Mac, the headphone remote functions will change volume, pause, fastfwd, rewind and track skip iTunes.

Tested on MacBook Pro mid-2010 with OS X 10.7.2

[crarko adds: This is an update to an earlier hint. I see in the comments of the previous hint that there are some Mac laptop models this didn't work on.]
  Post a comment  •  Comments (4)  
  • Currently 3.00 / 5
  You rated: 1 / 5 (7 votes cast)
[4,639 views]  View Printable Version