Public bug reported:

sudo will not work inside a chroot using qemu-user binaries.

$ sudo
sudo: sudo must be owned by uid 0 and have the setuid bit set

I built the Qemu 11.0.1 binaries and sudo works.

The story is slightly different on Debian Forky though, and Qemu 11.0.1
does not fix this, which is confusing. So something else might be going
on in Debian. As this will no doubt affect Ubuntu in a future release, I
thought it worth mentioning here.

Tested on amd64 and arm64 hosts - same result.

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: qemu-user (not installed)
ProcVersionSignature: Ubuntu 6.11.0-29.29~24.04.1-generic 6.11.11
Uname: Linux 6.11.0-29-generic x86_64
NonfreeKernelModules: nvidia_modeset nvidia
ApportVersion: 2.28.1-0ubuntu3.8
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: MATE
Date: Sun Jun 28 15:02:16 2026
KvmCmdLine: COMMAND         STAT  EUID  RUID     PID    PPID %CPU COMMAND
MachineType: LENOVO 0606AD5
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-6.11.0-29-generic 
root=UUID=83ed7b7f-ef51-49d7-a6be-a8efee1cdd32 ro rootflags=subvol=@ 
vt.handoff=7 zswap.enabled=1 zswap.shrinker_enabled=1 zswap.max_pool_percent=20 
zswap.zpool=zsmalloc zswap.compressor=lz4 
resume=UUID=afb35822-ba94-455b-839e-a91d503b9608 intel_iommu=on iommu=pt 
video=1920x1080@60
SourcePackage: qemu
UpgradeStatus: Upgraded to noble on 2026-05-15 (44 days ago)
dmi.bios.date: 12/15/2016
dmi.bios.release: 0.60
dmi.bios.vendor: LENOVO
dmi.bios.version: A0KT60AUS
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: LENOVO
dmi.board.vendor: LENOVO
dmi.board.version: NONE
dmi.chassis.type: 7
dmi.chassis.vendor: LENOVO
dmi.chassis.version: NONE
dmi.modalias: 
dmi:bvnLENOVO:bvrA0KT60AUS:bd12/15/2016:br0.60:svnLENOVO:pn0606AD5:pvrThinkStationS30:rvnLENOVO:rnLENOVO:rvrNONE:cvnLENOVO:ct7:cvrNONE:skuLENOVO_BI_A0:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: 0606AD5
dmi.product.sku: LENOVO_BI_A0
dmi.product.version: ThinkStation S30
dmi.sys.vendor: LENOVO

** Affects: qemu (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug arm64 fixed-upstream noble

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2158567

Title:
  sudo fails in a foreign chroot

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/2158567/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to