Affected versions: CentOS Stream 9

📖 ~1 min read

Table of contents
  1. Symptom & Impact
  2. Environment & Reproduction
  3. Root Cause Analysis
  4. Quick Triage
  5. Step-by-Step Diagnosis
  6. Solution – Primary Fix
  7. Solution – Alternative Approaches
  8. Verification & Acceptance Criteria
  9. Rollback Plan
  10. Prevention & Hardening
  11. Related Errors & Cross-Refs
  12. References & Further Reading

Symptom & Impact

podman as a non-root user fails with ‘newuidmap: write to uid_map failed’.

Environment & Reproduction

/etc/subuid or /etc/subgid lacks an allocation for the user.

Root Cause Analysis

useradd in Stream 9 may not pre-populate these files in all paths.

Quick Triage

grep /etc/subuid /etc/subgid; podman unshare cat /proc/self/uid_map.

Step-by-Step Diagnosis

Check newuidmap/newgidmap setuid bits via ls -l.

Illustrative mockup for centos-stream-9 — rootless_uids_diag
Diagnostic view for podman-rootless-subuid-subgid — Illustrative mockup — Progressive Robot

Solution – Primary Fix

Run usermod –add-subuids 100000-165535 –add-subgids 100000-165535 ; podman system migrate.

Still having issues? Our IT Solutions & Services team can diagnose and resolve this for you. Get in touch for a free consultation.

Illustrative mockup for centos-stream-9 — rootless_uids_fix
Remediation steps for podman-rootless-subuid-subgid — Illustrative mockup — Progressive Robot

Solution – Alternative Approaches

Pre-populate subuid/subgid via Ansible user module before login.

Verification & Acceptance Criteria

podman run –rm alpine id succeeds with mapped uids.

Rollback Plan

Restore previous subuid/subgid lines and re-run podman system migrate.

Prevention & Hardening

Bake user subuid ranges into provisioning automation.

Related: user namespaces sysctl and slirp4netns version.

Related tutorial: View the step-by-step tutorial for centos-stream-9.

View all centos-stream-9 tutorials on the Tutorials Hub →

Browse all common problems & solutions on the Tutorials Hub.

References & Further Reading

podman.io rootless docs and Red Hat container chapter.

Need Expert Help?

If you cannot resolve this yourself, our team offers hands-on Server Management, Managed IT Services, and flexible Support Plans. Contact us today — we respond within one business day.