How to set a Grub root password on Ubuntu 20.04
In this process, we have to do it as the root user. So, open a terminal and run. sudo -i. Then you will be the root user. Next, generate a securely encrypted password using the grub-mkpasswd-pbkdf2 command which will prompt you for one but it will be encrypted automatically. grub-mkpasswd-pbkdf2 Enter password: Reenter password: 1.-.
Get a Quote