Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/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