homebysix / jss-filevault-reissue

A framework for re-escrowing missing or invalid FileVault keys with Jamf Pro.
Apache License 2.0
186 stars 56 forks source link

made CURRENT_USER definition not call Python #32

Closed mpanighetti closed 4 years ago

mpanighetti commented 4 years ago
homebysix commented 4 years ago

If it's all the same, I'd rather switch to:

CURRENT_USER=$(/bin/echo "show State:/Users/ConsoleUser" | /usr/sbin/scutil | /usr/bin/awk '/Name :/&&!/loginwindow/{print $3}')

for the reasons outlined here: https://scriptingosx.com/2020/02/getting-the-current-user-in-macos-update/

mpanighetti commented 4 years ago

Sounds like the main reason to use the SystemConfiguration method is if the system has root enabled. Definitely an edge case but I have no issue using it since it produces mostly the same results. Will update.

homebysix commented 4 years ago

Thanks!