No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.


eSight V300R010C00 Maintenance Guide 07

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Changing the Password of GRUB

Changing the Password of GRUB

GRand Unified Bootloader (GRUB) is used to take over from the BIOS at boot time, load itself, and load the Linux kernel into the memory, and then hand over the execution permission to the kernel. You are advised to set a password for security protection of the GRUB.


The Linux has been configured to boot from GRUB and a password has been set.


The default password of GRUB is GRUB@123. You need to update the password in time.


  1. Run the following command to check whether the password has been set for GRUB:

    # grep "password_pbkdf2" /boot/grub2/grub.cfg

    password_pbkdf2 root grub.pbkdf2.sha512.10000.2FCF0FD6F8CFBCCC757BDEA5F78C7C8EC2437B8BC8188BA086B92BB852500C65D1B0F37DEA910DB014B890CCC9EC0A2BE0D839B75FFDDB9EA95CC7D5ABC724CD.54BCCAE1D1978B53154EAA074A661C5062D73E520D50E7F64328DAABC54A0A30FDFA92947DDBE8B68DFC40D3EC8B27CF769CF84F33ED3E0FB812BA499EDE0183

    If the command output is displayed, a password has been set for GRUB. To change the password of GRUB, go to the next step. Otherwise, no further action is required.

  2. Use the built-in tool grub2-mkpasswd-pbkdf2 to obtain the ciphertext of a password.

    # grub2-mkpasswd-pbkdf2

    Enter the password as prompted.

    Enter a password:

    Reenter password:

    The system returns the encrypted password based on the entered password.

    PBKDF2 hash of your password is



    In the command output, "grub.pbkdf2.sha512.10000.4A5B174AD357CD7CF1DA757850E4E2D18E01D264CBD97DBD9130FFF901461F46A04F71667B635A401A1E8466561A6D718176D496787208FF412A8A3A71CE25F4.7172AAEF68D96381E1A06C4C4B2BEE50DCB0BE28853C72D1B48BA5ACF9A6987BDF7589A71A83F52F39CC78941341B7F9916F1679E3B223CFE6E533793BFEBAB4" is the encrypted password. This is an example. Enter the actual password.

  3. Modify the /boot/grub2/grub.cfg file.

    # vi /boot/grub2/grub.cfg

    Modify the command output in step 1 as follows:

    password_pbkdf2 root <Encrypted Password>


    In the command output, "<Encrypted Password>" is the encrypted password. This is an example. Enter the actual password.

Updated: 2019-06-30

Document ID: EDOC1100044373

Views: 25043

Downloads: 74

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Previous Next