Modify how_to_config_grub2_password_protection.mkd

This commit is contained in:
samson 2018-12-12 04:49:15 +08:00
parent e0f97af8a7
commit 1ed60be217
1 changed files with 2 additions and 2 deletions

View File

@ -21,11 +21,11 @@ It will generate a long password encrypted like this: grub.pbkdf2.sha512.10000..
### 1Modify /etc/grub.d/10_linux ### 1Modify /etc/grub.d/10_linux
In /etc/grub.d/10_linux, find the following line: In /etc/grub.d/10_linux, find the following line:
``` ```
printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}" echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
``` ```
Add --users '': Add --users '':
``` ```
printf "menuentry '${title}' ${CLASS} --users '' {\n" "${os}" "${version}" echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} --users '' \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
``` ```
### 2Modify/etc/grub.d/30_os-prober ### 2Modify/etc/grub.d/30_os-prober