Friday, May 20, 2016

How to change the grub password ?

If you don't want someone booting your machine without permission, you can add a password to your GRUB entries. You can add a password only to specific entries if you wish; this will require a user to enter a password before loading only those boot entries you protect. This method very useful for your server security. But if u forgot your GRUB password you can proceed bellow steps.


01. Login as root

02. create an new encrypted password for grub 
[root@srinivaslinux~]#grub-md5-crypt
Password: ******
 (uddika)
Encrypted: $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password)


03. copy the new encrypted password by highlighting it using the mouse

04. Open the grub configuration file for editing 

[root@srinivaslinux~]#nano /etc/grub.conf

05. Find this line

password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/

06. Replace with the following line (Right click the mouse to paste new password)
password --md5 $1$ZWnke0$1fzDBVjUcT1Mpdd4u/T961 (encrypted password above)

07. Save this file

Ctrl + O

08. Exit the file 

Ctrl + X

No comments:

Post a Comment