Skip to content

Fix complete sudo lockout on Kubuntu 25.10#21

Draft
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-sudo-issues-kubuntu-25-10
Draft

Fix complete sudo lockout on Kubuntu 25.10#21
Copilot wants to merge 2 commits into
masterfrom
copilot/fix-sudo-issues-kubuntu-25-10

Conversation

Copy link
Copy Markdown

Copilot AI commented May 2, 2026

After installation and locking, users on Kubuntu 25.10 were locked out of both sudo and sudo delayed — the latter being the intended escape hatch.

Changes

delayed-admin.sudoers — add NOPASSWD:

%delayed-admin ALL = NOPASSWD: /usr/local/bin/delayed

Without NOPASSWD:, sudo delayed requires PAM authentication. On Kubuntu 25.10 (and potentially other newer distros), PAM restricts sudo auth to members of the sudo group — so once a user locks themselves (removed from sudo, added to delayed-admin), they can't authenticate for sudo at all. The CI test runner already overrode the file to add NOPASSWD:, making this the intended runtime behavior. Security is provided by the time delay, not the password prompt.

lib/linux.sh — more robust admin_group() detection

  • Explicitly handles kubuntu and other Ubuntu derivatives (linuxmint, pop, neon, elementary, zorin)
  • Adds grep-based ID_LIKE fallback for unrecognized distro IDs (avoids subshell-sourcing /etc/os-release)
  • Adds last-resort fallback: checks whether sudo or wheel group actually exists on the system
  • Emits a clear fatal error if no admin group can be determined, instead of silently setting ADMIN_GROUP to an empty string

Copilot AI linked an issue May 2, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix sudo not working on Kubuntu 25.10 Fix complete sudo lockout on Kubuntu 25.10 May 2, 2026
Copilot AI requested a review from miheerdew May 2, 2026 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not working on Kubuntu 25.10

2 participants