[Casper] Script Help: Logged On user

Ernst, Craig S. ERNSTCS at uwec.edu
Fri Sep 26 11:07:25 PDT 2008


I tried $1 earlier because that was everything I had ready online, but that came back with nothing, at least in Leopard. =)

Craig


On 9/26/08 9:56 AM, "Miles Leacy IV" <miles.leacy at gmail.com> wrote:

I don't have my script library with me, but I believe in a bash login
script, $1 returns the short name of the user logging in.  It might be
$2 or $3.  I really ought to put my scripts on my iDisk.  :)


On Fri, Sep 26, 2008 at 10:37 AM, Ernst, Craig S. <ERNSTCS at uwec.edu> wrote:
> This is the dumbest thing, but I need some help with some scripting if
> possible.
>
> I have a policy that calls a shell script that's already local on the box
> (why it has to be local I won't get into here) when a particular set of
> users logs on as defined in the policy. So the advanced tab has a command
> for '/bin/sh /some/file/ondisk.sh'
>
> What I need it to do is copy a file also local on the machine to the Desktop
> of the user that just logged on. I can't just use username=$(whoami) because
> the policy calls the script as root, and it shouldn't copy to root of
> course.
>
> Can someone help? Let me know if you need more clarification. I'm sure this
> should be the simplest thing ever for me to do, but for the life of me...
>
> Thanks,
>
> Craig Ernst
> Systems Management & Configuration
> ----------------------------------
> University of Wisconsin-Eau Claire
> Learning & Technology Services
> 105 Garfield Ave
> Eau Claire, WI 54701
> Phone: (715) 836-3639
> Fax: (715) 836-6001
> ----------------------------------
> ernstcs at uwec.edu
>
> _______________________________________________
> Casper mailing list
> Casper at list.jamfsoftware.com
> http://list.jamfsoftware.com/mailman/listinfo/casper
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.jamfsoftware.com/pipermail/casper/attachments/20080926/c3cf8d15/attachment.htm 


More information about the Casper mailing list