Posted on 08-10-2022 12:55 PM
We have Yubikeys paired keys with MacOS. I have to export Yubikey Cert infos to shared smb.
Solution: I have a Powershell script to deploy on admin and non admin users.
Requirements:
These commands are working just fine locally. Am not able to write these commands using a script to be deployed as Jamf Policy. Any idea?
Solved! Go to Solution.
Posted on 08-17-2022 12:59 PM
You should just be able to create a package (using Composer or Packages, my favorite) and install the script where ever it need to be. Make sure your permission are set correctly as well.
Posted on 08-10-2022 01:30 PM
Homebrew needs to be installed within the user context and Jamf runs scripts under the root. You could try running each of those commands as the user in your script. (See this excellent article. Running a Command as another User – Scripting OS X)
With that being said, I would NOT recommend this approach of using Homebrew to install other packages. Instead i would look at installing PowerShell via a package. It looks like Microsoft provides and installation package that should work better. It looks like Yubi also provides a package installer for ykman. You should be able to upload both packages to Jamf and create a policy to install them.
Posted on 08-17-2022 10:31 AM
Hello @Tribruin
You're right. I can run the powershell script using without need to use Brew.
Meanwhile, i don't know how to push my script on machines !! any idea ?
Shall i upload the ps1 file to machines than run it or else?
yours,
Posted on 08-17-2022 12:59 PM
You should just be able to create a package (using Composer or Packages, my favorite) and install the script where ever it need to be. Make sure your permission are set correctly as well.
Posted on 08-17-2022 01:51 PM