Posted on 08-07-2011 02:17 PM
In case anyone's interested: http://macmule.com/2011/08/07/how-to-map-drives-printers-based-on-ad-group-membership-on-osx/
Posted on 09-08-2011 08:31 AM
Updated to get the nodename from the users dscl record & then use quoted form.
So now working on 10.7 :)
Posted on 07-09-2012 09:36 AM
How are you getting the script to push from Casper?
Casper runs scripts as root so you can't get the logged on user by doing whoami.
Casper does have a few system variables it uses to push things to scripts that you run and logged in user is one of them "$3".
In bash you just set the script to say something like loggedinuser=$3 but how would you do that in an applescript?
(I tried set loggedInUser to do shell script "$3") and that didn't work.
Posted on 07-09-2012 09:45 AM
You're right. 'whoami' in a script run via Casper will return "root"
You can change that line to something like:
set loggedInUser to do shell script "/usr/bin/who | awk '/console/{print $1}'"
$3 will also work, but only for login triggers and via Self Service.
Posted on 07-09-2012 11:35 AM
I've used each of the 3 @ one point.