Scroll to navigation

NEWGIDMAP(1) newgidmap NEWGIDMAP(1)

NAME

newgidmap - set the gid mapping of a user namespace

SYNOPSIS

newgidmap [options] pid gid lowergid count [gid lowergid count...]

DESCRIPTION

The newgidmap command sets the gid mapping of the user namespace of the process pid by writing to /proc/pid/gid_map, using the ranges given on the command line.

This implementation delegates the task via the varlink protocol to newidmapd(8), which performs the privileged operation on its behalf.

After the pid argument, the command expects one or more sets of three integers:

gid

Beginning of the range of GIDs inside the user namespace.

lowergid

Beginning of the range of GIDs outside the user namespace.

count

Length of the ranges (both inside and outside the user namespace).

The mappings are only applied if the caller is the owner of the process pid and every GID in the requested range lowergid to lowergid+count is allowed for the caller according to subgid(5). A process is always allowed to map its own GID.

newgidmap can only be used once per process, as the kernel allows the gid mapping of a user namespace to be written only a single time.

OPTIONS

-h, --help

Print a usage message and exit.

-v, --version

Print the program version and exit.

FILES

/etc/subgid

List of the user's subordinate user IDs.

/proc/[pid]/gid_map

Mapping of GIDs between user namespaces.

SEE ALSO

newgidmap(1), newidmapd(8), subuid(5), subgid(5), user_namespaces(7)

07/17/2026 account-utils 1.4.0