N/APosted on - 06/24/2011
I am a new user in Linux. I am using Fedora 14 OS. I want to protect my computer, so nobody can enter my PC. For this reason, I gave an Admin Password. But one of my friend unlocks it, using grub. So is there anyway, that I can give password in the Grub of Fedora OS? If yes, then give me detailed information about that. Thanks.
How to give password in Grub of the OS?
Yes, you can give a password in the grub of your operating system. For that, you need to know some commands. First of all, you have to know about Terminal. There is a program in the system tools, in the Menu bar of Fedora called Terminal.
You have to open it. Then use this command:
#Password: give your admin password
Now type grub-md5-crypt command in the terminal. This will generate an encrypted password.
The output will be like this:
The password is generated. Now your task will be to copy this information, to a file named grub.conf
go to /boot/grub/grub.conf and edit the file. When it opens add the password in the file as below:
password –md5 $1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0(This is no same for you)
The .conf file is like this:
password –md5 $1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0
title Debian GNU/Linux, kernel 220.127.116.11-cust-en-smp
kernel /boot/vmlinuz root=/dev/hda3 ro
Now save the file & close it. That will do the job. Reboot your PC and try to go to grub & you will be asked for a password. Now you’re protected.