APFS and fdesetup seem to be the order of the day in testing the new OS.
Currently our organization has a workflow to manage the password for an admin account on every Mac.
1. jamf management account is added to FV
2. The local admin account password is reset via script
3. A second script runs to remove the admin account from filevault, then re-add it with the current password utilizing a plist and with the jamf management account as the FV authenticated user
4. The plist is cleaned
5. The jamf management account is removed from FV
This workflow runs without issue on any device with FileVault 2 enabled that has HFS+ as its filesystem (including 10.13).
However, when we try the same workflow with an APFS volume we receive an error. Specifically, it references the currently logged in user for some reason.
Script Result: Error: Unable to add one or more users to FileVault. (-69578) OD user '<logged in user name>' could not be authenticated
I would assume the plist would negate any reference to the logged in user, but I'm guessing this changed for APFS?
For reference, here is a sanitized version of what we deploy:
#!/bin/bash
# JAMF Parameters
# $4 = Managaement account
# $5 = Management account password
# $6 = admin account
# $7 = admin account password suffix
prefix=someprefix
# Command to remove the existing user from FileVault
fdesetup remove -user $6
# create the FileVault plist file:
echo '<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Username</key>
<string>'$4'</string>
<key>Password</key>
<string>'$5'</string>
<key>AdditionalUsers</key>
<array>
<dict>
<key>Username</key>
<string>'$6'</string>
<key>Password</key>
<string>'$prefix $7'</string>
</dict>
</array>
</dict>
</plist>' > /tmp/fvreadd.plist
# Imports the plist into FileVault
fdesetup add -inputplist < /tmp/fvreadd.plist
# remove fvreadd.plist
rm /tmp/fvreadd.plist
exit 0
Forgot to mention this has been tested on 10.13 GM build 17A362a and JamfPro 9.101.0.
