Hey everyone,
I am about to deploy a user agent and this is the rough idea, please give me feed back, pointers, suggestions, or if you wish to sacrifice some livestock to please the computer gods feel free.
#!/bin/bash
# set user's login.keychain to have our wifi passsword # run this as the user, via user agent
/usr/bin/security find-generic-password -a usd500_wpa
case `/bin/echo $?` in
0 )) hasloginkeychain=yes;; * )) hasloginkeychain=no;; esac
if [[ $hasloginkeychain -eq yes ]]
then /usr/bin/security add-generic-password -a usd500_wpa -s AirPort -D "AirPort network password" -l usd500_wpa -w mypasskey -T /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -T /usr/libexec/airportd -U ~/Library/Keychains/login.keychain
else /usr/bin/security add-generic-password -a usd500_wpa -s AirPort -D "AirPort network password" -l usd500_wpa -w mypasskey -T /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -T /usr/libexec/airportd -A ~/Library/Keychains/login.keychain
fi
exit 0
So I will have a user agent that runs this script. I am not a huge user of user agents, so if I put the script in /Library/Scripts and then have the agent run the script from that location will it be able to run and as that user, as long as the everyone x it is enable right?
Thanks, Tom
Thomas Larkin
TIS Department | Mac Systems Administrator KCKPS USD500
tlarki at kckps.org
blackberry: 913-449-7589
office: 913-627-0351
chown -R us /.base
