List FileVault 2 Enabled users

TechSpecialist
Contributor

Hello...

I thought this would be easy but I'm struggling.

I need to create a report that contains all "FileVault 2 Enabled Users" per machine that is rolled into Jamf.

I can click on an individual machine and check it manually per machine at the disc encryption section, but I can't figure out to have this automated into a report via an Inventory search/Smart Group.

Anyone?

4 REPLIES 4

donmontalvo
Esteemed Contributor III

Would an EA help...even if Jamf Pro has issues with carriage returns?

#!/bin/bash

STATUS=$(fdesetup status)
LIST=$(fdesetup list | cut -f1 -d",")

if [[ $STATUS = "FileVault is on." ]]
then
    echo "<result>"$LIST"</result>"
else
    echo "<result>"$STATUS"</result>"
fi

The report would just need to include the EA data.

--
https://donmontalvo.com

CBrown
New Contributor II

How do we setup the EA to list the users with this?

The output we are currently seeing FileVault 2 users:
FileVault is On. FileVault master keychain appears to be installed.

CBrown
New Contributor II

Can you also recommend a way we could modify this to list non FV2 users?

JevermannNG
Contributor II

There is a ";" missing in the original post, this one works for me:

#!/bin/bash

STATUS=$(fdesetup status)
LIST=$(fdesetup list | cut -f1 -d",")

if [ "$STATUS" = "FileVault is On." ];
then
echo "<result>"$LIST"</result>"
else
echo "<result>"$STATUS"</result>"
fi