Running Unix Commands Via JAMF

Helme
New Contributor

Hi All,

I am trying to push a few terminal commands via jamf to users machines. I wrote the script up and it states it has completed the deployment successfully. When i go to test what the script is supposed to do, there are no changes. I need this to run as the local user. I understand that by default it runs as root. Below is my current apple script.

do shell script "sudo defaults write com.google.Chrome AuthServerWhitelist '<Domain>'"
do shell script "sudo defaults write com.google.Chrome AuthServerWhitelist '
<Domain>'"

4 REPLIES 4

donmontalvo
Esteemed Contributor III

Is this a duplicate post?

Running Unix Commands Via JAMF
https://jamfnation.jamfsoftware.com/discussion.html?id=12003

--
https://donmontalvo.com

htse
Contributor III

can you set the the full path of the plist instead of the domain?

defaults write /Users/$USER/Library/Preferences/com.google.Chrome.plist…

bentoms
Release Candidate Programs Tester

The JAMF Binary runs as root, so those changes will be being made to the root users account.

Tbh, this would be better managed via a config profile or managed preference

thoule
Valued Contributor II

When I needed to do that, I created a LaunchAgent. JAMF runs as root so you can make a mess when trying to modify a user's plist files directly.