How to give password in Grub of the OS?

Asked By 30 points N/A Posted on -
qa-featured

Hi,

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.

SHARE
Best Answer by Ronald Weasely
Best Answer
Best Answer
Answered By 0 points N/A #129207

How to give password in Grub of the OS?

qa-featured

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:

#su login

#Password: give your admin password

Now type grub-md5-crypt command in the terminal. This will generate an encrypted password.

# grub-md5-crypt

The output will be like this:

Password:<ENTER-YOUR-PASSWORD>

Retype password:<ENTER-YOUR-PASSWORD>

$1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0

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:

default         0

timeout         5

password –md5 $1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0

title           Debian GNU/Linux, kernel 2.6.13.4-cust-en-smp

root           (hd0,0)

kernel        /boot/vmlinuz root=/dev/hda3 ro

savedefault

boot

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.

Related Questions