Posted on 07-08-2019 07:37 AM
I have LAPS currently setup in my environment and I would like to make another script that uses the password stored in the LAPS EA for running some commands. I am having a difficult time making a variable that is set to the stored EA in JSS.
Any help would be great!
Solved! Go to Solution.
Posted on 07-08-2019 09:30 AM
I'm using the same method, this is what I'm using in another script that pulls the value from the EA titled "LAPS". You'd need to define the variables, as well.
LAPS="$(/usr/bin/curl -s -f -u $apiUser:$apiPass -H "Accept: application/xml" $apiURL/JSSResource/computers/udid/$udid/subset/extension_attributes | xpath "//extension_attribute[name=$extAttName]" 2>&1 | awk -F'<value>|</value>' '{print $2}')"
Posted on 07-08-2019 07:40 AM
Are you using macOSLAPS? Or LAPSforMac?
Posted on 07-08-2019 07:46 AM
I am using LAPSforMac.
Posted on 07-08-2019 09:20 AM
Why wouldn't you just run what you need to as root using JAMF?
Posted on 07-08-2019 09:30 AM
I'm using the same method, this is what I'm using in another script that pulls the value from the EA titled "LAPS". You'd need to define the variables, as well.
LAPS="$(/usr/bin/curl -s -f -u $apiUser:$apiPass -H "Accept: application/xml" $apiURL/JSSResource/computers/udid/$udid/subset/extension_attributes | xpath "//extension_attribute[name=$extAttName]" 2>&1 | awk -F'<value>|</value>' '{print $2}')"