I need to set a bootloader password and am apprehensive about changing the existing config (per warning about potentially making a system unbootable).
RH documentation says to add the following lines:
cat <<EOF
set superusers="john"
password john johnspassword
EOF
The current /etc/grub.d/01_users
file already has this at the top:
#!/bin/sh -e
cat << EOF
if [ -f \${prefix}/user.cfg ]; then
source \${prefix}/user.cfg
if [ -n "\${GRUB2_PASSWORD}" ]; then
set superusers="root"
export superusers
password_pbkdf2 root \${GRUB2_PASSWORD}
fi
fi
EOF
Should I append the first part below the existing EOF, replace the existing content altogether, or something else?