1NEWGIDMAP(1)                     User Commands                    NEWGIDMAP(1)
2
3
4

NAME

6       newgidmap - set the gid mapping of a user namespace
7

SYNOPSIS

9       newgidmap pid gid lowergid count [gid lowergid count [ ... ]]
10

DESCRIPTION

12       The newgidmap sets /proc/[pid]/gid_map based on its command line
13       arguments and the gids allowed. Subgid delegation can either be managed
14       via /etc/subgid or through the configured NSS subid module. These
15       options are mutually exclusive.
16
17       Note that the root group is not exempted from the requirement for a
18       valid /etc/subgid entry.
19
20       After the pid argument, newgidmap expects sets of 3 integers:
21
22       gid
23           Beginning of the range of GIDs inside the user namespace.
24
25       lowergid
26           Beginning of the range of GIDs outside the user namespace.
27
28       count
29           Length of the ranges (both inside and outside the user namespace).
30
31       newgidmap verifies that the caller is the owner of the process
32       indicated by pid and that for each of the above sets, each of the GIDs
33       in the range [lowergid, lowergid+count) is allowed to the caller
34       according to /etc/subgid before setting /proc/[pid]/gid_map.
35
36       Note that newgidmap may be used only once for a given process.
37
38       Instead of an integer process id, the first argument may be specified
39       as fd:N, where the integer N is the file descriptor number for the
40       calling process's opened file for /proc/[pid[. In this case, newgidmap
41       will use openat(2) to open the gid_map file under that directory,
42       avoiding a TOCTTOU in case the process exits and the pid is immediately
43       reused.
44

OPTIONS

46       There currently are no options to the newgidmap command.
47

FILES

49       /etc/subgid
50           List of user's subordinate group IDs.
51
52       /proc/[pid]/gid_map
53           Mapping of gids from one between user namespaces.
54

SEE ALSO

56       login.defs(5), newusers(8), subgid(5), useradd(8), userdel(8),
57       usermod(8).
58
59
60
61shadow-utils 4.14.0               10/03/2023                      NEWGIDMAP(1)
Impressum