I don’t no why I can’t add it before… ;because it’s so easy
- First of all, we must define user and password for it.
-
cp /etc/grub.d{,.bac}cd /etc/grub.dvim 00_header
cat << EOF
set superusers=”simon”
password simon 123456
password othuser 1234
EOF
-
add these lines to end of file
-
-
- Protecting:
- All linux kernels (just linux):
vim 10_linuxfind this:
printf “menuentry ‘${title}’ ….
and change it to:printf “menuentry –users simon othuser ‘${title}’ ….
- All menu entries:
sed -i -e ‘/^menuentry /s/ {/ –users simon othuser {/’ 10_linux 20_linux_xen 30_os-prober 40_custom 41_custom
- All linux kernels (just linux):
- Finish by these commands:
update-grub
reboot # have fun 😉
Advertisements