File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
macOS/Config/Bootstrap Token Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ function print_status {
4141}
4242
4343# Check if the boostrap token was ever escrowed. If not, stop early as success.
44- if echo " profiles status -type bootstraptoken" | grep -q " Bootstrap Token escrowed to server: NO" ; then
44+ if profiles status -type bootstraptoken 2>&1 | grep -q " Bootstrap Token escrowed to server: NO" ; then
4545 exit 0
4646fi
4747
@@ -50,6 +50,9 @@ if cat "$logdir/checkBootstrapEscrow.log" | grep -q "Bootstrap Token validated."
5050 exit 0
5151fi
5252
53+ # Check secure token status for the admin account
54+ SECURE_TOKEN_STATUS=$( sysadminctl -secureTokenStatus " $ADMIN_USERNAME " 2>&1 )
55+
5356# Fail early if the account provided does not have secure token enabled
5457if echo " $SECURE_TOKEN_STATUS " | grep -q " Secure token is DISABLED" ; then
5558 echo " $( date) | Secure token is disabled for $ADMIN_USERNAME . Not proceeding."
You can’t perform that action at this time.
0 commit comments