Posted on 04-07-2017 09:23 AM
Hi All,
I've finally moved to publishing some of my more useful junk. Here's a much-discussed issue that we fixed internally with a collaborative script that I finalized. This is a version that is scrubbed of our environment's details.
Any pro-tips on password handling in scripts are appreciated. This works, but is by no means the limit of perfection.
https://github.com/primalcurve/macsupportpub/blob/master/scripts/FileVault_Sync_Scrubbed.sh
Much love to @typingpool and @Janowski for their contributions.
Posted on 04-07-2017 11:09 AM
Hi @primalcurve ,
You put together a great work flow, I have something similar in my environment.
What I would probably add:
1. Check for Internal Network (Unless you AD is external)
2. Domain Remediation (Try to fix the environment by rebinding attempted if no connected)
Also, I like what you did with the FileVault 2 add and removable, I thought of something similar and I like your approach.
What I ultimately found was the 'createmobileaccount' command did the proper resync of the users account with FileVault.
/System/Library/CoreServices/ManagedClient.app/Contents/Resources/createmobileaccount -n "username"
What happens is the users account profile is re-pulled and applied even to the FV lock screen. It takes a little time depending on enviroment.
Since this is not instantaneous and for best result, I also request the user to logout.
Upon login the users account should reflect the FV lock.
Hopefully this helps perfect your script :)
Posted on 04-07-2017 11:52 AM
Some great tips. Thank you for your response, @ShadowGT .
I'm totally trying out that createmobileaccount trick. If that works in our environment, I can absolutely automate that. Thanks!