[Casper] run script as different user?

Jeremy Matthews jeremymatthews at mac.com
Wed Aug 20 10:13:40 PDT 2008


Criss,

We just got this working this morning...works pretty well - we're  
using a user-based LaunchAgent that runs on login.

We even have the script securely delete itself, as well as the  
LaunchAgent (writing defaults shouldn't take more than one  
time)....cool stuff!

Thanks,
jeremy

On Aug 20, 2008, at 12:41 PM, Criss Myers wrote:

> what about a login hook to run the defaults company, i use that to  
> setup my screensaver prefs
>
> criss
>
> Criss Myers
> Senior Customer Support Analyst (Mac Services)
> Apple Certified Technical Coordinator v10.5
> LIS Business Support Team
> Library 301
> University of Central Lancashire
> Preston PR1 2HE
> Ex 5054
> 01772 895054
>>>> Jeremy Matthews <jeremymatthews at mac.com> 20/08/08 5:14 PM >>>
> Tried applying to all users - the file is created, but I then have to
> go in a muck around with ownership - or else it gets overwritten when
> certain apps are launched and cannot find a valid plist. If I try to
> return the session user during an installation, it is usually root.
>
> Our 10.5 server is working, but clients are not binding properly, so
> MCX attributes are out - unless I want to push those out as well, but
> pointless until it is set for production.
>
> It was my understanding that composer used packagemaker, and therefore
> during an "installation", runs as root - which brings me back to the
> issue - script needs to run as a different user - without me asking
> the user to authenticate.
>
> Tried the tilde - didn't work.
>
> Config file sounds interesting....what is that about?
>
> Thanks,
> j
>
> On Aug 20, 2008, at 11:54 AM, Thomas Larkin wrote:
>
>> You can do this many ways.
>>
>> use a wild card and apply to all users
>>
>> enforce it from MCX if you are running Open Directory
>>
>> Use composer and take a snap shot of the modification and assign it
>> to smart groups with in casper, then deploy
>>
>> set it up as a self service policy and use the ~/ for that users  
>> plist
>>
>> set it in the (forgot the file path) configuration file that pushes
>> out new user settings every time a user is created
>>
>> What exactly are you trying to do?
>>
>> Thomas Larkin
>> TIS Department
>> KCKPS USD500
>> tlarki at kckps.org
>> cell:  913-449-7589
>> office:  913-627-0351
>>>>> Jeremy Matthews <jeremymatthews at mac.com> 08/20/08 10:49 AM >>>
>> I want to write defaults to a plist for a user that won't get horked.
>> Needs to be pre-created...
>>
>> Thanks,
>> jeremy
>>
>> On Aug 20, 2008, at 11:42 AM, Thomas Larkin wrote:
>>
>>> May I ask why you would want to do this?
>>>
>>> If you can script it, Casper can and will run it.  If we know your
>>> higher goal perhaps we can better answer your question.
>>>
>>> Thomas Larkin
>>> TIS Department
>>> KCKPS USD500
>>> tlarki at kckps.org
>>> cell:  913-449-7589
>>> office:  913-627-0351
>>>>>> Jeremy Matthews <jeremymatthews at mac.com> 08/20/08 10:35 AM >>>
>>> Casper can run scripts against your box, but it does so as a root
>>> user
>>> - what if I want to run the script as a different user, such as the
>>> one who is logged in - without prompting for a password (like su-)?
>>>
>>> Thanks,
>>> j
>>> _______________________________________________
>>> Casper mailing list
>>> Casper at list.jamfsoftware.com
>>> http://list.jamfsoftware.com/mailman/listinfo/casper
>>>
>>
>>
>
> _______________________________________________
> Casper mailing list
> Casper at list.jamfsoftware.com
> http://list.jamfsoftware.com/mailman/listinfo/casper
>



More information about the Casper mailing list