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


Click here to return to the 'Create protected passwordless ssh logins - Part 1 of 3' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Create protected passwordless ssh logins - Part 1 of 3
Authored by: jaysoffian on Mar 28, '06 07:34:19AM
Here's my current version of LoginHook/LogoutHook. Save this snippet as "SystemHook" then follow the comments to install it (you can delete SystemHook after that):

#!/bin/sh
#
# INSTALLATION INSTRUCTIONS:
# sudo mkdir /Library/Hooks
# sudo cp SystemHook /Library/Hooks/LoginHook
# sudo cp SystemHook /Library/Hooks/LogoutHook
# sudo chown -R root:wheel /Library/Hooks
# sudo chmod -R 755 /Library/Hooks
# sudo defaults write com.apple.loginwindow LoginHook /Library/Hooks/LoginHook
# sudo defaults write com.apple.loginwindow LogoutHook /Library/Hooks/LogoutHook
#
home="`niutil -readprop . "/users/$1" home`"
hook="$home/Library/Hooks/`basename $0`"
[ -x "$hook" ] || exit 0
exec su - -f "$1" -c "$hook" "$@"



[ Reply to This | # ]