1. Boot to the single usermode (edit kernel menu by adding 1 or Single and boot) ##Optional / if root password lost##
2. cd /sbin/ ##changing directory to /sbin and do ls -ltr for grub-md5-crypt
3. ./grub-md5-crypt
Password : ***********
@#$345dfdsdfre#$%@$%dsfe
paste it beneath timeout section in grub.conf (/etc/grub.conf or /boot/grub/grub.conf)
password --md5 @#$345dfdsdfre#$%@$%dsfe
-------------------------------------------------------------------
# grub-crypt Password: GrbPwd4SysAd$
Retype password: GrbPwd4SysAd$
^9^32kwzzX./3WISQ0C
# grub-crypt --sha-256
# grub-crypt --md5
You can also use md5crypt to encrypt the password. In that case, you should use
“password --md5 encrypted-password”
in your grub.conf file.
2. cd /sbin/ ##changing directory to /sbin and do ls -ltr for grub-md5-crypt
3. ./grub-md5-crypt
Password : ***********
@#$345dfdsdfre#$%@$%dsfe
paste it beneath timeout section in grub.conf (/etc/grub.conf or /boot/grub/grub.conf)
password --md5 @#$345dfdsdfre#$%@$%dsfe
-------------------------------------------------------------------
# grub-crypt Password: GrbPwd4SysAd$
Retype password: GrbPwd4SysAd$
^9^32kwzzX./3WISQ0C
####
#Just copy the output of the grub-crypt command,
#and paste it after the “–encrypted”
#argument in the password entry.
####
$ cat /etc/grub.conf
default=0
timeout=15
password --encrypted ^9^32kwzzX./3WISQ0C
##done
By default, the grub-crypt command encrypts the password using
SHA-512 algorithm. You can also encrypt the password either using
SHA-256 or MD5 alrogithms as shown below.# grub-crypt --sha-256
# grub-crypt --md5
You can also use md5crypt to encrypt the password. In that case, you should use
“password --md5 encrypted-password”
in your grub.conf file.
No comments:
Post a Comment