Skip to content

Instantly share code, notes, and snippets.

@rtrouton
Created August 12, 2014 11:19
Show Gist options
  • Save rtrouton/f5e8a6ed36dd37e9b62b to your computer and use it in GitHub Desktop.
Save rtrouton/f5e8a6ed36dd37e9b62b to your computer and use it in GitHub Desktop.
#!/bin/sh
#fix for custom guest login keychain errors
LOGGER="/usr/bin/logger"
GID=`id -g`
if [[ ${GID} == 201 ]]; then
$LOGGER -s -t fix.guest.keychain.sh "Current user is guest. Creating a login.keychain" 1>&2
security create-keychain -p "" login.keychain
security login-keychain -s ~/Library/Keychains/login.keychain
security unlock-keychain -p "" login.keychain
fi
$LOGGER -s -t fix.guest.keychain.sh "Done" 1>&2
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment