#!/bin/bash ########################################################################## # Script : Change FW-PW # Autor : Andreas Vogel # Copyright : macenterprise gmbh, 2020 ########################################################################## unset setpassword_fv unset rotatepassword_fv unset adduser_fv ############################################# Jamf Hepler Messanger ############################################################# jamfHelper="/Library/Application Support/JAMF/bin/jamfHelper.app/Contents/MacOS/jamfHelper" jamf="/usr/local/bin/jamf" ErrorIcon="/Library/Application Support/JAMF/ING/France_road_sign_A14.svg.png" Error="An unexpected error has occurred. The encryption does not work properly. Please contact Mac support." MessageIcon="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/ToolbarCustomizeIcon.icns" Message="The Filevault setting must be updated. Please enter your current Windows password in the next window." ############################################# Variablen ######################################################################### Status=$(fdesetup status | head -1 | cut -d ' ' -f 3) user=$(stat -f '%u %Su' /dev/console | cut -d ' ' -f 2) DecryptString() { # Usage: ~$ DecryptString "Encrypted String" "Salt" "Passphrase" echo "${1}" | /usr/bin/openssl enc -aes256 -d -a -A -S "${2}" -k "${3}" } adminName="$7" adminPass=$(DecryptString "$4" "$5" "$6") ############################################# Funktion ######################################################################### enable_fv () { expect <