Adding Lock to MenuBar

Bhughes
Contributor

Hello -
I was wondering if anyone has been successful adding the lock the the MenuBar, (to provide users a shortcut to lock their screen), via script. I would like to set this up as a policy, and make it available in SelfService. I can see how others have added the VPN, clock, airport, battery etc...(com.apple.systemuiserver.plist) but don't see anything for the lock (keychain).

Thanks,
Ben

5 REPLIES 5

mm2270
Legendary Contributor III

The lock icon in the menubar comes from the Keychain Access application, not form the same location as the other Apple menubar items.

I would look at using a custom payload Configuration Profile for this. That's what we use to make sure the Keychain Access icon appears in the menubar.

scottb
Honored Contributor

This will open it and set the preference to "Show keychain status in menu bar". Probably a number of ways you could use it depending on your preference. Opening it appears to set the pref in the Keychain Access app. You can then just get the icon from the Keychain Access app and upload with the policy into Self Service.

  • Only tested this in 10.10.x.
open /Applications/Utilities/Keychain Access.app/Contents/Resources/Keychain.menu

I did one real quick and her's how it could look. Works fine.
3dbfbb4d93fa420ab8d25e424b57285a

Bhughes
Contributor

@scottb Thanks, that looks like it will work!

jhbush
Valued Contributor II

@Bhughes we use a profile like @mm2270 so each user gets that setting automatically.

com.apple.mcxMenuExtras
Keychain.menu=true

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Keychain.menu</key>
    <true/>
</dict>
</plist>

Reboot2611
New Contributor

Hi @jhbush1973

I am new to casper admin and still learning the ropes. Is it possible for you to explain in more detail how I can implement this for all users.

Thanks