Multiple Grub2 Users With Passwords

Home » CentOS » Multiple Grub2 Users With Passwords
CentOS 1 Comment

Hello All,

I am trying to set multiple users with passwords for modifying grub2
menu entries at boot. I know I can set a “root” user grub2 password with grub2-setpassword. I have also been able to make a grub2 user password using the grub2-mkpasswd-pbkdf2 command and adding

    set superusers=”user1″

to the /etc/grub.d/40_custom file. However, I have multiple user administrators that will possibly need access to grub at boot (i.e. to boot to single user mode to fix a broken configuration file). I’ve tried generating two different passwords with grub2-mkpasswd-pbkdf2 and adding:

    set superusers=”user1, user2″

    password_pbkdf2 user1 grub.pbkdf2.sha512.1000./hash1/

    password_pbkdf2 user2 grub.pbkdf2.sha512.1000./hash2/

with no success. The first user account worked but not the second.

Does anyone know the correct syntax to add multiple grub2 user accounts with different passwords in 40_custom? All tutorials I’ve found online explain a single user but not multiple.

One thought on - Multiple Grub2 Users With Passwords

  • I figured out my error. I had a typo in my 40_custom file and forgot to run grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg when I added the second user.

    For anyone that finds this message trying to solve this issue the correct syntax is:

        set superusers=”user1″, “user2”

        password_pbkdf2 user1 /hash1/

        password_pbkdf2 user2 /hash2/

    CentOS mailing list CentOS@CentOS.org https://lists.CentOS.org/mailman/listinfo/CentOS