Posted on 05-17-2018 09:53 AM
Hey all,
So the old Extension Attribute "EFI Password Mode" seems not to function in 10.12 and I was looking to see if anyone had created an update for it before I started to reinvent the wheel.
Old one pasted below:
#!/bin/sh
result=`nvram -p | grep security-mode | awk '{print $2}'`
if [ "$result" != "" ]; then
echo "<result>$result</result>"
else
echo "<result>none</result>"
fi
Gabe Shackney
Princeton Public Schools
Posted on 05-17-2018 09:59 AM
You should be able to replace the nvram line with "firmwarepasswd -check" and have something that'll work.
Posted on 05-17-2018 10:08 AM
Below is what I use, works fine in 10.12
firmwarePass="$(firmwarepasswd -check)";
if [ "$firmwarePass" == "Password Enabled: Yes" ]; then
echo "<result>Set</result>";
else
echo "<result>Not Set</result>"
fi
Posted on 05-17-2018 12:12 PM
@cbrewer @Chris.Tavenner
Thanks both!
Working great now. Guess we should submit it to be updated in the JSS built in template.
Gabe Shackney
Princeton Public Schools