grub unrestricted option only applies to default menuentry

Bug #2016894 reported by James Paton-Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Won't Fix
Undecided
Unassigned

Bug Description

After adding a grub superuser and password, and attempting to set the '--unrestricted' option for all grub menu entries, I am still prompted for a username and password when I try to select any menu entry that isn't the default 'Ubuntu'

Steps to reproduce:
Create a grub superuser and password
Modify the CLASS variable in /etc/grub.d/10_linux to include the '--unrestricted' option for all entries.
Update grub

What happens (the issue)
/boot/grub/grub.cfg is updated, and I can see that all menu entries include the '--unrestricted' option
Upon reboot, I can boot the default 'Ubuntu' entry without entering a password, but selecting the 'Advanced options for Ubuntu' submenu results in a username/password prompt

What I expect to happen
I should be able to select any grub menu entry and boot from it. The username/password prompt should only show if you try to edit the menu entry or drop to the grub cli

ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: grub-common 2.06-2ubuntu7.1
ProcVersionSignature: Ubuntu 5.19.0-38.39~22.04.1-generic 5.19.17
Uname: Linux 5.19.0-38-generic x86_64
ApportVersion: 2.20.11-0ubuntu82.4
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Tue Apr 18 14:45:54 2023
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_GB.UTF-8
 SHELL=/usr/local/bin/bash
SourcePackage: grub2
UpgradeStatus: No upgrade log present (probably fresh install)
mtime.conffile..etc.grub.d.10_linux: 2023-04-18T14:17:05.597477

Revision history for this message
James Paton-Smith (jamesps) wrote :
Revision history for this message
Julian Andres Klode (juliank) wrote :

Have you tried setting the --unrestricted option on the submenu?

In any case, modifications to grub.d scripts are outside the normal operation of the grub2 package. It's very hard to merge them on updates, and you really shouldn't be touching them. I think it's a mistake they're in /etc.

If you want support for grub superuser password stuff and unrestricted default class, I suggest submitting patches to upstream that enables setting those from /etc/default/grub, as I don't foresee this in scope for the Ubuntu enablement work, and the same applies to enabling the features to work if they're not even supported by the generator.

Changed in grub2 (Ubuntu):
status: New → Won't Fix
Revision history for this message
James Paton-Smith (jamesps) wrote :

I've already added the --unrestricted option to the submenu but still not working. Which is why I thought this might be a bug. But I understand modifying the grub scripts is not ideal.

I can see there is already a bug upstream to add this as an option to the /etc/default/grub config file but appears to be in limbo: https://savannah.gnu.org/bugs/?41801

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.