Setting a password to grub after installation of Linux O.S.
Everyone who is using linux knows that while installation we can set grub a password.
But if in case some one forgets to set a password for the same,then we can do it even after installation.
Here is the way to do it.
Please find the attachment.
Note:- you should be a root to do that.
# grub-md5-crypt
(t will ask for a password then)
Password :- xyz
Retype password :- xyzPassword will then be created in an encrypted form.
Just copy that encrypted password.Then Go to
# vi /boot/grub/grub.conf
Under the option “Hiddenmenu” write
Password --md5 (paste the password which you have copied above)
Save the file and restart your machine to go into single user mode.
You’ll be unable to enter into it unless and until you press the “P” button to type the
Password which you have set for the grub.
Once you enter that, you are done.