Set Gurb2 Password In Linux

How to reset the root password but its security vulnerable to Linux.Anyone who have physical access to system can easily reset the root password. So we can avoid it by using the setting up of the grub password.
To set the grub password we set superuser name and password in grub configuration file.

For this we have to modify the grub2.conf file in /etc/ directory
firstly we have to create a password by using grub2-mkpasswd-pbkdf2 command copy the password and enter password twice as follows
[root@hackthesec]# grub2-mkpasswd-pbkdf2
Enter password:

Reenter password:

PBKDF2 hash of your password is: grub.pbkdf2.sha512.10000.19074739ED80F115963D984BDCB35AA671C24325755377C3E9B014D862DA6ACC77BC110EED41822800A87FD3700C037320E51E9326188D53247EC0722DDF15FC.C56EC0738911AD86CEA55546139FEBC366A393DF9785A8F44D3E51BF09DB980BAFEF85281CBBC56778D8B19DC94833EA8342F7D73E3A1AA30B205091F1015A85
Then open /etc/grub2.conf file and locate ### BEGIN /etc/grub.d/10_linux ###
section type the code as follows here I used the username is root that is our choice
set superusers "root"export superusers
password_ pbkdf2 root
That’s It, Now You can reboot and Press "e" on Grub Menu, It will ask you for the password.

About Author:

I am a Linux Administrator and Security Expert with this site i can help lot's of people about linux knowladge and as per security expert i also intersted about hacking related news.TwitterFacebook

Newer Post
Older Post


Post a Comment