I've been banging my head against a wall on this.
We have Sophos which allows us to enforce filevault and manage the recovery key. We need to add a service account to the machine with a random password per machine and give it securetoken so it can decrypt. The service account and user account will both be administrator. We're using Jamf Connect (rolling it out once this is solved).
LAPSUser key in Jamf Connect + Enabled Filevault won't work because both the service account and user account need to be admins. I thought about making them standard and then making them admin afterwards.
Support suggested this:
https://github.com/kc9wwh/FileVaultEnableAdminAccount
However the password will be random so I'd need to somehow grab it and pass it in.
I also saw some posts about this script which syncs passwords as an extension attribute:
https://github.com/NU-ITS/LAPSforMac
Maybe passing the password from the attribute to the previous script?
The only reason we want the service account to have securetoken is because there's usually an issue with the sync between filevault and the local account password. That and the user forgets their old password once they changed it. We can get in with the recovery key but we have to decrypt and re-encrypt it to allow them to decrypt with their local password whenever that happens. Unless we have a securetoken user where we can just sign in and then remove and re-add them using fdesetup. Also if we for whatever reason rotate the service account password then we're pretty much screwed is my understanding.
I feel like I'm way out of my wheelhouse here with this level of scripting.
Is there a better solution for this?
What's everyone else doing?
I hope Jamf is working on something to make this easier.
I keep coming back to this: https://travellingtechguy.eu/jamf-connect-and-laps/
However I need to promote the user to admin afterwards somehow and then probably abandon Sophos for filevault management to avoid conflicts.