]> git.99rst.org Git - openwrt-packages.git/commit
sudo: create sudo group
authorMichael Pfeifroth <redacted>
Tue, 4 Aug 2026 15:25:32 +0000 (17:25 +0200)
committerAlexandru Ardelean <redacted>
Fri, 7 Aug 2026 10:34:12 +0000 (13:34 +0300)
commit6b5954ef81534f775510a03ef2b529df4f634e42
tree1d97cf43720f9ceffcf7a5b112654a78d69d6978
parentca04783f334c5b70531106925a15f19b3b0494c5
sudo: create sudo group

Add a 'sudo' system group at package-install time using the USERID
mechanism.

Rationale: sudoers configurations that grant privileges to the 'sudo'
group -- the near-universal Debian/Ubuntu idiom, e.g.

    %sudo ALL=(ALL:ALL) NOPASSWD: ALL

-- fail silently on OpenWrt today because no 'sudo' group exists in
/etc/group.  sudo(8) logs 'unknown group: sudo' and the rule is skipped.
Users also cannot 'usermod -aG sudo <user>' without the group present,
so there is no straightforward way to delegate root without hand-editing
/etc/group or writing per-user sudoers snippets.

Seeding the group here matches how OpenWrt already handles other
service accounts (chrony, dbus, ntpd, ...): the USERID mechanism
creates them lazily via add_group_and_user in the postinst script.

No privileges are granted by default -- an administrator still has to
add users to the group and ship a sudoers rule that references it.

No numeric GID is pinned. The group name is what sudoers, addgroup(1),
and getgrnam() operate on; the numeric GID is invisible to sudo's
authorisation path and matters only for on-disk group ownership
metadata (e.g. 'chgrp sudo' persisted to shared storage) -- something
this package does not do. Letting add_group_and_user pick a dynamic
GID in the 32768+ range keeps sudo out of base-files' reserved
low-range group space and avoids any name-vs-number collision debate.

Bump PKG_RELEASE.

Signed-off-by: Michael Pfeifroth <redacted>
admin/sudo/Makefile
git clone https://git.99rst.org/PROJECT