Allow any user to run GRUB menu entry, while password protect menu entry edit and GRUB shell.

This document (000020871) is provided subject to the disclaimer at the end of this document.


SUSE Linux Enterprise Server 15 All Releases
SUSE Linux Enterprise Server 12 All Releases


Administrators want to password protect GRUB menu entry edit and the GRUB shell, while allow any user to run a menu entry without username and password.


Add the --unrestricted option to menuentry.

For example, the following changes to /etc/grub.d/10_linux will allow the default menu entry to be run by any user. The system will boot automatically. If users edit the default menu entry, username and password will be prompted to proceed.
--- a/10_linux
+++ b/10_linux
@@ -27,6 +27,8 @@
 export TEXTDOMAINDIR="${datarootdir}/locale"

 CLASS="--class gnu-linux --class gnu --class os"
+# Allow any user to execute a menu entry while superusers is set

 if [ "x${GRUB_DISTRIBUTOR}" = "x" ] ; then
@@ -138,7 +140,7 @@
       echo "menuentry '$(echo "$title" | grub_quote)' $(print_hotkey) ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
-      echo "menuentry '$(echo "$os" | grub_quote)' $(print_hotkey) ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
+      echo "menuentry '$(echo "$os" | grub_quote)' $(print_hotkey) ${CLASS} ${MENUENTRY_UNRESTRICTED} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
   if [ x$type != xrecovery ] ; then

Create new grub.cfg for the next boot
grub2-mkconfig -o /boot/grub2/grub.cfg


When GRUB boot password is set, GRUB prompts for username and password to run all menu entries.

Additional Information



This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:000020871
  • Creation Date: 22-Nov-2022
  • Modified Date:06-Jan-2023
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

Join Our Community

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

SUSE Customer Support Quick Reference Guide SUSE Technical Support Handbook Update Advisories
Support FAQ

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.

Go to Customer Center