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

Vagabond
New Contributor

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 13

Look
Valued Contributor III

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

Vagabond
New Contributor

Nope. Tried that. It will not load.

htse
Contributor III

are you able to install the package during login?

Vagabond
New Contributor

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

Look
Valued Contributor III

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

davidacland
Honored Contributor II
Honored Contributor II

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.

htse
Contributor III

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?

Vagabond
New Contributor

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
Honored Contributor II
Honored Contributor II

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.

calumhunter
Valued Contributor

@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
Esteemed Contributor III

@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

--
https://donmontalvo.com

bentoms
Release Candidate Programs Tester

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.

guidotti
Contributor II

Second @bentoms