besides that the wiki is completly outdated "grub2-setpassword" only works on english machines https://bugzilla.redhat.com/show_bug.cgi?id=1292830

if /etc/grub.d/01_users would containa comment that "/boot/grub2/user.cfg" (who knows prefix just staring at the source of that file) just needs the hash output of "grub2-mkpasswd-pbkdf2" in the variable "GRUB2_PASSWORD" it would be so more helpful

[root@testserver:/etc/grub.d]$ grub2-setpassword
Enter password:
Confirm password:

[root@testserver:/etc/grub.d]$ locate user.cfg
/boot/grub2/user.cfg

[root@testserver:/etc/grub.d]$ cat /boot/grub2/user.cfg
GRUB2_PASSWORD=Passwort eingeben:
Passwort erneut eingeben:
PBKDF2-Prüfsumme Ihres Passworts ist grub.pbkdf2.sha512.10000.094C7CFED3F6F9D9854C821E48C6D2909C720B806BF69303D5782EA31790AF2ACD89ED73DA4A53C1B94D7E37EC240AAEEA85E779E1C88DE0ECA899747479F130.C7CEB0D35AF519B3C616871AF2BE9C02B151EBFA57162192DF45DA39FF80F871E1D1D87FCFD7C33016412BA835AEA8FECCFA44431C8EA0B43150F62FE5BBB0EE

Am 18.12.2015 um 13:16 schrieb Reindl Harald:
https://fedoraproject.org/wiki/GRUB_2#Setting_a_password_for_interactive_edit_mode

_____________________________

If you wish to password-protect GRUB2's interactive edit mode but you do
not want to require users to enter a password to do a plain, simple,
ordinary boot, create /etc/grub.d/01_users with the following lines:

cat << EOF
set superusers="root"
export superusers
password root secret
EOF
_____________________________

and then you find such a file there pointing to some "user.cfg" where
nobody knows what \${prefix} is and how that is supposed to work -
honestly the whole grub2 config stuff is cryptical crap while "More
details can be found at Ubuntu Help: GRUB2 Passwords" even makes it more
confusing

[root@testserver:~]$ cat /etc/grub.d/01_users
#!/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

Attachment: signature.asc
Description: OpenPGP digital signature

--
devel mailing list
devel@lists.fedoraproject.org
http://lists.fedoraproject.org/admin/lists/devel@lists.fedoraproject.org

Reply via email to