setting up grub password in shell

Setting up grub”s password in gui is very easy but sometimes X server sucks by taking that situation in consideration we can set-up the grub password in shell

First you need to encrypt your password. You can do that by running the “md5crypt” command from
within the GRUB shell. Then you need to add a “password” command to grub.conf that uses that
encrypted password, like this:

#touch grub

#grub-md5-crypt >grub Press Enter

Note: – Nothing will be appear on your screen so don’t hesitate.
Type The Password such as redhat press enter.
Retype the password redhat press enter.

# vi /root/grub /etc/grub.conf

This command will open both the file in vi editor as shown in the above example.

Retype password:

Now copy the encrypted passwords using yy.

Then press :
and type n (This will switch you to the next file /etc/grub.conf).

And after the splashimage=(hd,0,0) line : –

press pp to paste the encryped password from the previous file.

and add the following line before the encrypted password like this: –

password –md5 $1$I2w2s1$EPZtrLn/h2M4qfh48ZL8O0

Press :wq

Save and exit and reboot your system. ) and ur done


Tags: , , , ,

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: