个人恢复密钥的目的 其实是 用户帐户的密码登不进去了,,,
帐户锁定后,我们可以解锁用户帐户看看,,,,,,,,,,如下图两个图


解锁帐户后,重新登录后,似乎我们需要修改帐户的密码才行
个人恢复密钥 比较实用
机构恢复密钥 不太重要,不太实用
个人恢复密钥 personal recovery key,unknown
是不是要在 self service 当中再启用一下
How to Manage FileVault
https://www.y2b.com/watch?v=5zQEQwoRoDA&list=PLAGm7fU4wolOEACxN2XJc8kB8YHtT3Kta&index=1
What is FileVault on a Mac? When Should You Enable FileVault?
https://www.y2b.com/watch?v=IkAk3A0-DKs
Jamf 100官方培训视频 2020年版 40个合成完全版
https://www.bilibili.com/video/BV1tK41137bH/?spm_id_from=333.337.search-card.all.click&vd_source=346847773d1f74962a4daab9ddf7f228
安全令牌 secure token
对macOS有所帮助在apfs卷上,加密密钥是在用户创建期间设置第一个用户的密码或在
mac用户首次登录期间生成的,,,在mac Os 11或更高版本中,有几种不同的方式
为mac上的第一个用户设置初始密码
导致该用户在某些工作流程中被授予安全令牌,这可能不是
所需的行为,因为之前授予第一个安全令牌将需要用户
帐户登录这种语言,这是非常有意的,特别是如果部署工作流程以
编程方式添加其他本地
用户,当执行此操作的策略可能在设置期间创建
第一个预期主用户帐户之前运行时
安全令牌是用户创建或登录的附加令牌,将被托管到mdm,以便将附加密钥
发送到mdm,,并且 mac os 可以在认为合适时请求,
如果用户帐户登当时没有安全令牌,则登录窗口将在他们登录时授予他们一个,
这也可以用于带有m1芯片的apple silicon 计算机的不同管理工作流程
引导令牌 bootstrap token
macos 10.15引入的
重要的是要注意引导令牌
不需要由管理员主动管理
Mac操作系统将在任何时候尝试创建它 可以像jamf pro一样将其发送到mdm,
并且在认为合适时也会请求它,也不
需要采取任何操作
卷所有权 Volume ownership
这个主题特定于采用苹果芯片的计算机,
虽然它与文件库没有直接关系
但我们今天讨论的内容
导致成功部署文件库的工作流程,,
也适用于部署具有苹果芯片的计算机Apple Silicon,,
并确保计算机上的用户
具有用于不同功能的卷所有权属性
简而言之,它是另一个加密用户
属性,允许用户访问存储
在安全飞地中的所有者身份密钥,,
并且是软件更新管理等功能所必需的
遗留内核扩展以及
引导令牌也具有卷
所有者权限,这意味着由
mdm服务器启动的软件更新也可以以
编程方式提供授权
如果您有一个用户
收到安全令牌的工作流程,他们也
应该所有者
好吧,我们已经确定了mac OS
处理用户帐户的加密密钥,
首先重新审视的是用户何时设置的概念
一台Mac自己,这可以通向最
直接的路径,
这是基本工作流程,
如果您在用户设置的这种情况下使用
真正的零接触部署,它确实会被接受,
他们获得第一个安全令牌的新计算机,
引导令牌被托管到mdm,
因此,如果您有
需要稍后登录的托管管理员,他们可以通过
这种方式从mdm检索并获取令牌,,
一旦设置了管理操作,
就像我们一样。我们将查看前面的这些选择,
该操作可以为该用户启用文件保管库,,
然后托管个人恢复密钥,以便
将来在需要访问磁盘时使用
这里有关于
组织设置时令牌如何工作的指南,
因为它的帐户将是
第一个获得令牌的帐户而不是
日常用户,这实际上是该区域
您希望对这些工作流程保持谨慎,或者至少
知道您的部署受到如何影响
并检查令牌状态,
因此种情况是,如果IT管理员
设置一台计算机,
他们将获得第一个令牌,
但好消息在macos 11或更高版本中
引导令牌也会被托管,
因此通常很容易
解决,但有几种情况,
但是,如果在创建用户之前运行堵塞策略,
则可能会导致意外的用户
获得第一个令牌,这是
由策略设置创建的本地帐户
密码可以获取令牌和传递用户名和密码的脚本,
这通常不是个好的安全
实践,它也可以为该脚本用户提供
第一个安全令牌,,
请注意如果您执行额外的操作
jam pro prestage或jamf
管理帐户中的用户创建了
不适用于底部两项的用户
并且不会获得第一个
安全令牌
来自 https://support.apple.com/en-hk/guide/deployment/dep24dbdcf9e/web
三种方法启用文件保险箱

在设定描述符中设置

描述符发布方法: Install Automatically

在策略中设置


上图的 Personal Key 的位置



当启用 Enable FileVault时,下面的 User adjustment of FileVault options 就强制变灰了


不管是在 设定描述符还是在策略中设置了 文件保险箱,如果条件为触发登录的用户,启动时就会像下面这样子的,,,,点下图的 取消 就无法登录
许多管理员更喜欢登录触发器,,,,因为用户实际上被迫选择您接下来 启用

Jamf Connect Login
JAMF连接登录
Benefits
优势
Part of first login, Automated Device Enrollment flow
首次登录的一部分,自动化设备注册流程
First user authentication will:
第一次用户身份验证将:
Create first user account, assign first Secure Token
创建第一个用户帐户,分配第一个安全令牌
Enable FileVault without additional logout and login
无需注销和登录即可启用FileVault

Jamf Connect Login
JAMF连接登录
Requirements
要求
Must be first user created during provisioning
必须是在资源调配期间创建的第一个用户
Jamf Connect configured to enable FileVault
配置为启用FileVault的JAMF连接
PPPC profile for Connect deployed (Checkbox to deploy)
已部署连接的PPPC配置文件(要部署的复选框)
Config profile to escrow Personal Recovery Key
托管个人恢复密钥的配置文件 禁止关闭pppc的文件保管库
PPPC: Privacy Preferences Policy Control,隐私首选项策略控制

系统=>计算机管理=>安全









# sudo fdesetup list -extended #在本电脑查看令牌

# diskutil apfs listCryptoUsers / #与上面的操作的功能类似 这里斜杠 / 指的是 卷,根目录的意思吧


重新发布新恢复密钥(已有个人恢复密码)

如果没有个人恢复密钥

如果没有个人恢复密钥
你可以定位符合某些智能组标准的设备并使用将修复并
颁发新密钥的工作流程来定位它们,
因此使用文件库验证的智能组进行定位是无效的
使用文件库加密的计算机
应该为您提供一组
您想要放置此
工作流程的良好目标
它不需要解密,所以
谢天谢地,数据将始终受到保护
但您将希望将该
恢复密钥
放回到该管理记录中
这可以
使用该智能组将其设置为持续策略,因此如果设备
落入没有经过验证的恢复密钥的标准
可能会被定位和触发,
它实际上是
脚本和配置文件的组合
配置文件将被设置为托管
密钥,而脚本将被设置为告诉
fde安装程序生成新的密钥
密钥利用当前用户的密码
作为生成密码的方法,
以获取更多信息,可
在jamf pro或 jamf github页面上找到此链接
FileVault2_Scripts / reissueKey.sh
允许您自定义它并添加您自己的品牌,可以 把这个脚本放在自助服务 self service 当中
jamf reissueKey.sh
reissueKey.sh 脚本是用于在 Jamf Pro 中重新发行注册配置文件的工具。通过运行 reissueKey.sh,可以为已经在 Jamf Pro MDM 系统中注册的 macOS 设备生成新的注册配置文件证书。使用 reissueKey.sh,可以为设备创建新的注册配置文件,而无需取消注册并重新注册设备。这对于排除 MDM 问题或更新设备上的注册配置文件非常有用。要使用 reissueKey.sh,只需在需要新注册配置文件的设备上运行该脚本,并按照屏幕提示生成新密钥。
reissueKey.sh 需要结合配置文件一起使用吗
是的,reissueKey.sh 脚本需要与注册配置文件(也称为enrollment profile)一起使用。注册配置文件包含了设备的认证信息和与 Jamf Pro MDM 服务器通信所需的证书。当运行 reissueKey.sh 脚本时,它会使用现有的注册配置文件来重新生成新的 Key,然后将生成的新证书与注册配置文件相关联。这样,设备就能够使用新的证书与 Jamf Pro 服务器进行通信,而无需取消注册并重新注册设备。因此,在使用 reissueKey.sh 脚本之前,请确保你已经有有效的注册配置文件可用。
可以直接把 reissueKey.sh 这个脚本放到 jamf 的 策略当中,然后在 self service 中 点击运行吗
是的,你可以将reissueKey.sh脚本作为Jamf的策略之一,然后在Self Service中让用户点击运行。这样用户就可以通过Self Service轻松地执行重新发行注册配置文件的操作,而无需过多的管理员干预。
要将reissueKey.sh脚本添加到Jamf的策略中,你可以使用Jamf Pro的管理控制台来创建一个新的策略,并将reissueKey.sh脚本作为一个自定义脚本或命令行脚本添加到该策略中。然后,将该策略设置为在Self Service中可见,使用户能够轻松运行该脚本以重新生成注册配置文件。
https://github.com/jamf/FileVault2_Scripts

值得注意的是,
如果任何组织使用
机构恢复密
而不是个人恢复密钥,则
此重新颁发工作流程
总结一下:
当需要托管新的个人
恢复密钥以持续
管理您的设备组时,也很有用
如果您部署其他lT用户
帐户,文件库并不需要很复杂,但您应该评估您
当前的目标或将其他用户
创建策略设置为在
创建主用户后运行
因此了解您的部署工作流程及其
给出的结果
实际上是第一步
无论您是否需要
更改某些内容,修改
都会更容易在
前端执行此操作部署的而
不是返回并尝试修复您的启用方法实际上可以是
个人偏好
策略配置文件,
这实际上取决于您
只需确保将其设置为
以您想要的方式启用并让该
密钥托管
轮换需要时使用密钥
以及授予有限权限的任何内容
您都可以
在jamf pro中设置访问权限
并审核谁可以查看这些
恢复密钥,
实际上,涉汲文件库操作时,大多数事倩都
应该是设置后就可以
忘记
在许多经历入职流程的客户中
这些工作流程甚至是补救工作
流程(如果需要)通常会
立即进行设置,允许这些设备
签入以及是否需要采取行动以
在jamf中进行基于库存的自动化pro
可以完成工作
来自 https://www.y2b.com/watch?v=5zQEQwoRoDA&list=PLAGm7fU4wolOEACxN2XJc8kB8YHtT3Kta&index=1
jamf 个人恢复密钥为 unknownn 咋办

如果在 Jamf 中看到“Personal Recovery Key Validator: Unknown”,意味着系统无法确认该计算机的个人恢复密钥的状态。以下是一些可能的解决方案:
检查 FileVault 状态:
重新启动 Jamf 客户端:
重新生成恢复密钥:
检查 Jamf 配置:
联系技术支持:
务必确保对恢复密钥进行备份,避免未来可能导致文件或数据的不可访问。
github 上的代码 如下 remake_person_reissueKey 策略是 重新获取个人恢复密钥 因它有弹窗,要求输入用户名 bbbb-admin 和 它的密码,所以必须在 self service 上才好使
#!/bin/bash
####################################################################################################
#
# Copyright (c) 2017, JAMF Software, LLC. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
# * Neither the name of the JAMF Software, LLC nor the
# names of its contributors may be used to endorse or promote products
# derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY JAMF SOFTWARE, LLC "AS IS" AND ANY
# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL JAMF SOFTWARE, LLC BE LIABLE FOR ANY
# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
####################################################################################################
#
# Description
#
# The purpose of this script is to allow a new individual recovery key to be issued
# if the current key is invalid and the management account is not enabled for FV2,
# or if the machine was encrypted outside of the JSS.
#
# First put a configuration profile for FV2 recovery key redirection in place.
# Ensure keys are being redirected to your JSS.
#
# This script will prompt the user for their password so a new FV2 individual
# recovery key can be issued and redirected to the JSS.
#
####################################################################################################
#
# HISTORY
#
# -Created by Sam Fortuna on Sept. 5, 2014
# -Updated by Sam Fortuna on Nov. 18, 2014
# -Added support for 10.10
# -Updated by Sam Fortuna on June 23, 2015
# -Properly escapes special characters in user passwords
# -Updated by Bram Cohen on May 27, 2016
# -Pipe FV key and password to /dev/null
# -Updated by Jordan Wisniewski on Dec 5, 2016
# -Removed quotes for 'send {${userPass}} ' so
# passwords with spaces work.
# -Updated by Shane Brown/Kylie Bareis on Aug 29, 2017
# - Fixed an issue with usernames that contain
# sub-string matches of each other.
# -Updated by Bram Cohen on Jan 3, 2018
# - 10.13 adds a new prompt for username before password in changerecovery
# -Updated by Matt Boyle on July 6, 2018
# - Error handeling, custom Window Lables, Messages and FV2 Icon
# -Updated by David Raabe on July 26, 2018
# - Added Custom Branding to pop up windows
# -Updated by Sebastien Del Saz Alvarez on January 22, 2021
# -Changed OS variable and relevant if statements to use OS Build rather than OS Version to avoid errors in Big Sur
####################################################################################################
#
# Parameter 4 = Set organization name in pop up window
# Parameter 5 = Failed Attempts until Stop
# Parameter 6 = Custom text for contact information.
# Parameter 7 = Custom Branding - Defaults to Self Service Icon
#Customizing Window
selfServiceBrandIcon="/Users/$3/Library/Application Support/com.jamfsoftware.selfservice.mac/Documents/Images/brandingimage.png"
jamfBrandIcon="/Library/Application Support/JAMF/Jamf.app/Contents/Resources/AppIcon.icns"
fileVaultIcon="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/FileVaultIcon.icns"
if [ ! -z "$4" ]
then
orgName="$4 -"
fi
if [ ! -z "$6" ]
then
haltMsg="$6"
else
haltMsg="Please Contact IT for Further assistance."
fi
if [[ ! -z "$7" ]]; then
brandIcon="$7"
elif [[ -f $selfServiceBrandIcon ]]; then
brandIcon=$selfServiceBrandIcon
elif [[ -f $jamfBrandIcon ]]; then
brandIcon=$jamfBrandIcon
else
brandIcon=$fileVaultIcon
fi
## Get the logged in user's name
userName=$(/usr/bin/stat -f%Su /dev/console)
## Grab the UUID of the User
userNameUUID=$(dscl . -read /Users/$userName/ GeneratedUID | awk '{print $2}')
## Get the OS build
BUILD=`/usr/bin/sw_vers -buildVersion | awk {'print substr ($0,0,2)'}`
## This first user check sees if the logged in account is already authorized with FileVault 2
userCheck=`fdesetup list | awk -v usrN="$userNameUUID" -F, 'match($0, usrN) {print $1}'`
if [ "${userCheck}" != "${userName}" ]; then
echo "This user is not a FileVault 2 enabled user."
exit 3
fi
## Counter for Attempts
try=0
if [ ! -z "$5" ]
then
maxTry=$5
else
maxTry=2
fi
## Check to see if the encryption process is complete
encryptCheck=`fdesetup status`
statusCheck=$(echo "${encryptCheck}" | grep "FileVault is On.")
expectedStatus="FileVault is On."
if [ "${statusCheck}" != "${expectedStatus}" ]; then
echo "The encryption process has not completed."
echo "${encryptCheck}"
exit 4
fi
passwordPrompt () {
## Get the logged in user's password via a prompt
echo "Prompting ${userName} for their login password."
userPass=$(/usr/bin/osascript -e "
on run
display dialog \"To generate a new FileVault key\" & return & \"Enter login password for '$userName'\" default answer \"\" with title \"$orgName FileVault Key Reset\" buttons {\"Cancel\", \"Ok\"} default button 2 with icon POSIX file \"$brandIcon\" with text and hidden answer
set userPass to text returned of the result
return userPass
end run")
if [ "$?" == "1" ]
then
echo "User Canceled"
exit 0
fi
try=$((try+1))
if [[ $BUILD -ge 13 ]] && [[ $BUILD -lt 17 ]]; then
## This "expect" block will populate answers for the fdesetup prompts that normally occur while hiding them from output
result=$(expect -c "
log_user 0
spawn fdesetup changerecovery -personal
expect \"Enter a password for '/', or the recovery key:\"
send {${userPass}}
send \r
log_user 1
expect eof
" >> /dev/null)
elif [[ $BUILD -ge 17 ]]; then
result=$(expect -c "
log_user 0
spawn fdesetup changerecovery -personal
expect \"Enter the user name:\"
send {${userName}}
send \r
expect \"Enter a password for '/', or the recovery key:\"
send {${userPass}}
send \r
log_user 1
expect eof
")
else
echo "OS version not 10.9+ or OS version unrecognized"
echo "$(/usr/bin/sw_vers -productVersion)"
exit 5
fi
}
successAlert () {
/usr/bin/osascript -e "
on run
display dialog \"\" & return & \"Your FileVault Key was successfully Changed\" with title \"$orgName FileVault Key Reset\" buttons {\"Close\"} default button 1 with icon POSIX file \"$brandIcon\"
end run"
}
errorAlert () {
/usr/bin/osascript -e "
on run
display dialog \"FileVault Key not Changed\" & return & \"$result\" buttons {\"Cancel\", \"Try Again\"} default button 2 with title \"$orgName FileVault Key Reset\" with icon POSIX file \"$brandIcon\"
end run"
if [ "$?" == "1" ]
then
echo "User Canceled"
exit 0
else
try=$(($try+1))
fi
}
haltAlert () {
/usr/bin/osascript -e "
on run
display dialog \"FileVault Key not changed\" & return & \"$haltMsg\" buttons {\"Close\"} default button 1 with title \"$orgName FileVault Key Reset\" with icon POSIX file \"$brandIcon\"
end run
"
}
while true
do
passwordPrompt
if [[ $result = *"Error"* ]]
then
echo "Error Changing Key"
if [ $try -ge $maxTry ]
then
haltAlert
echo "Quitting.. Too Many failures"
exit 0
else
echo $result
errorAlert
fi
else
echo "Successfully Changed FV2 Key"
successAlert
exit 0
fi
done
我自己亲自做的 2.0 版本如下 策略是 个人复原密钥2.0 没有弹窗
#!/bin/bash
#
#sudo fdesetup status | grep -i " On"
#if [ $? -ne 0 ];then
#sudo jamf recon
#exit 0
#fi
passwords=("1111" "2222" "3333" "4444" "5555" "6666" "7777" "8888" "9999" "1010" "1212" "1313" "1414" "1515" "1616") #
status=1 #初始值
for p in "${passwords[@]}"; do
/usr/bin/expect <<EOF
spawn sudo fdesetup changerecovery -personal
set timeout 30
expect {
"name" { send "bbbb-admin\r" }
}
expect {
"password" { send "1234\r" }
}
send "exit\r"
expect eof
EOF
result=$?
if [ $result -eq 0 ];then
sudo jamf recon
(/usr/bin/osascript -e 'display dialog "已成功生成新的个人恢复密钥!" buttons {"OK"} default button "OK"')
exit 0
fi
done
(/usr/bin/osascript -e 'display dialog "未成成功生成新的个人恢复密钥!" buttons {"OK"} default button "OK"')