Skip to main content
Question

Another Noobie asking another question - how do I make Casper log into the computer as admin before installation of a package?

  • February 10, 2015
  • 13 replies
  • 8 views

Forum|alt.badge.img+3

Hi there.

I have a small package from a vendor that needs to be run while logged in as an admin. You can't do it any other way and the vendor refuses to do anything about this odd flaw, despite acknowledging it.

What I'm looking for is a way to make Casper log off the current user, log in using the admin account, then running the package, then logging off as the admin about 2 mins later.

Can this be done? I'm horrid at scripting unfortunately.

Thanks, Nick

13 replies

Forum|alt.badge.img+16
  • Valued Contributor
  • February 10, 2015

You can't just capture the results using Composer and then push the resulting DMG?


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • February 10, 2015

Nope. Tried that. It will not load.


Forum|alt.badge.img+10
  • Contributor
  • February 10, 2015

are you able to install the package during login?


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • February 10, 2015

You mean when the user logs in and not an admin?


Forum|alt.badge.img+16
  • Valued Contributor
  • February 10, 2015

What is the package? Maybe someone around here has installed it before.


davidacland
Forum|alt.badge.img+18
  • Valued Contributor
  • February 10, 2015

It sounds like the the installer is doing something very odd to have that requirement. Adobe is similar unfortunately. Could you add the user to the admin group before running the installer? Might be easier than trying to logout / login etc.

There are some cases where the installer is so bad there's little you can do (Like this one: https://jamfnation.jamfsoftware.com/discussion.html?id=11822) but let us know what the app is and there might be some more suggestions.


Forum|alt.badge.img+10
  • Contributor
  • February 10, 2015

when a Casper management task runs, like installing a package it executes as the Casper management user, casper by default. That user is placed in the admin group on the local computer. So the package is already being being installed as an admin.

I assumed it needed to be done before the user logs in, thus the suggestion to move the trigger to login. However what is the package doing that it needs to be done with an admin interactively logged in?


Forum|alt.badge.img+3
  • Author
  • New Contributor
  • February 10, 2015

Look: FlexPLM - their add-in for Adobe Illustrator specifically.

David: I'd love to, but we're talking 1200 users spread out across the US.

Htse: See, no other package has this flaw. But you're right about Casper user, and maybe the answer is in there and I just need to fiddle some. It doesn't have to be before the user logs in really. If the user is an admin, they can install it at any time and use it immediately thereafter. Good thought however.


davidacland
Forum|alt.badge.img+18
  • Valued Contributor
  • February 10, 2015

Hi, no need to visit each Mac to get the users to the admin group. You can just add the with a script using dseditgroup and remove them afterwards.

@htse is quite right though, casper tasks don't run as the logged in user.


Forum|alt.badge.img+10
  • New Contributor
  • February 10, 2015

@Vagabond.
At the end of the day packages are just a method to put files on a disk.

If it were me, I would spend the time to pull the package or installer apart to see what files are put where and what scripts are run and try to "fix" the package so that it works unattended.

But what about making it a self service item, once per computer. Users can then install it from self service if it hasn't been installed already. Casper will install it with admin privs even if the user is not an admin as it uses the casper admin management account to escalate privileges.


donmontalvo
Forum|alt.badge.img+36
  • Hall of Fame
  • February 11, 2015

@calumhunter wrote:

But what about making it a self service item, once per computer. Users can then install it from self service if it hasn't been installed already. Casper will install it with admin privs even if the user is not an admin as it uses the casper admin management account to escalate privileges.

+1


bentoms
Forum|alt.badge.img+35
  • Hall of Fame
  • February 11, 2015

Definitely have a nose at what it's doing. I'm guessing this is a plugin?

We have a DeSL one that we're deploying & is mostly ok.

The issue could be that the installer needs to be running in a GUI session.. Not via a command line.

You might be able to cache the installer locally & then run launch the installer using Casper.. This will then run as root & in the users GUI session.

Might work.


Forum|alt.badge.img+18
  • Valued Contributor
  • February 11, 2015

Second @bentoms