I could use a little help
I am trying to make EA to report back when a user has signed into Kerberos SSO.
The way I am trying to go about is the read the SSO log file and scan for the word "Principal"
If Principal is in the log then the user signed in.
This is the EA I tried to make that is not working.
Thanks for any help
#!/bin/bash
loggedInUser=$( /usr/bin/who | /usr/bin/awk '/console/{ print $1 }' )
KSSOUSERID="$( /Users/$loggedInUser/Library/Logs/Kerberos_SSO.log | grep Principal | cut -d '=' -f2 | xargs)"
if [[ "${KSSOUSERID}" == "" ]] ;
then
/bin/echo "<result>Not Signed-In</result>"
else
/bin/echo "<result>Sign-In Complete</result>"
fi
exit 0


