以 Ubuntu 18.04.3 為例,新增 admin 帳號可以編輯開機選項,但正常開機時不用輸入帳號。
設定帳號/密碼,編輯 /etc/grub.d/40_custom
... set superusers="admin" password admin pass4admin
繼續編輯 /etc/grub.d/10_linux
搜尋 menuentry 找到這兩行,加上 --unrestricted
echo "menuentry '$(echo "$title" | grub_quote)' --unrestricted ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/" else echo "menuentry '$(echo "$os" | grub_quote)' --unrestricted ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
更新 GRUB
sudo update-grub
Images 0 | ||
---|---|---|
No images to display in the gallery. |