containers / containers/bubblewrap

--unshare-user not enough to be able to run useradd

Open
#310 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
8.7k
Forks
386
Avg merge
3d 17h
Merged PRs (30d)
11

Description

I try to mount a Fedora rootfs which employes standeard /etc/shadow system.

> bwrap --bind / --unshare-user --uid 0 --gid 0 adduser foo
adduser: cannot open /etc/gshadow

whereas if I type
> unshare -r bwrap --bind / --unshare-user --uid 0 --gid 0 adduser foo

I have no problems.

Why do I need the apparent hack of unshare the user namespace before bwrap to get the same permissions on /etc/gshadow ?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.