You failed to change into the root user.
To view that file, you must have root privileges.
You get that by using
sudo less /boot/grub2/grub.cfg
sudo has been set up and that you have permission to use it. The password that
sudo asks for is your unprivileged user's password, not the root password.
sudo has not been set up, then change into root with
This will also ask for a password, but in this case it's the root account's password.
Once you are root, you should configure your other user so that it can use
sudo. You do this using
visudo. See the