- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 01-26-2024 05:43 AM
Hi,
I am trying to install Snapgene, which requires the license install script to be executed as the logged in user as described here: https://support.snapgene.com/hc/en-us/articles/10304162065172-Command-Line-Installation-and-Activati...
My first attempt was simply to index using Composer, install Snapgene, execute script, build package with composer. Didn't work.
When I execute the script locally everything works as expected, whoever as soon as I try to deploy it using Jamf Pro it won't.
I then tried to follow https://scriptingosx.com/2020/08/running-a-command-as-another-user/ to no avail. The license won't be installed.
Is there another way, I'm not aware of, which would execute the script locally so everything works as expected?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 01-29-2024 05:59 AM
Honesty there is no good way to do this. You need to impersonate the user in CLI. Where yes, it is possible, it is not a simple task and can be very buggy. Not all commands will work as expected when you impersonate a user. Jamf like any other MDM with CLI access will run everything as Root, but it seems like you are already aware of that.
Ultimately you are dealing with a vendor problem. It sounds like they have not developed their tools in an enterprise friendly way. Usually, enterprise apps use a single product key for the org or use credential-based license entitlement now of days. For our apps that still need product keys that are user specific, we just have users enter the keys manually.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on 01-29-2024 05:59 AM
Honesty there is no good way to do this. You need to impersonate the user in CLI. Where yes, it is possible, it is not a simple task and can be very buggy. Not all commands will work as expected when you impersonate a user. Jamf like any other MDM with CLI access will run everything as Root, but it seems like you are already aware of that.
Ultimately you are dealing with a vendor problem. It sounds like they have not developed their tools in an enterprise friendly way. Usually, enterprise apps use a single product key for the org or use credential-based license entitlement now of days. For our apps that still need product keys that are user specific, we just have users enter the keys manually.
