Scroll to navigation

NEWUIDMAP(1) newuidmap NEWUIDMAP(1)

NAME

newuidmap - set the uid mapping of a user namespace

SYNOPSIS

newuidmap [options] pid uid loweruid count [uid loweruid count...]

DESCRIPTION

The newuidmap command sets the uid mapping of the user namespace of the process pid by writing to /proc/pid/uid_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:

uid

Beginning of the range of UIDs inside the user namespace.

loweruid

Beginning of the range of UIDs 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 UID in the requested range loweruid to loweruid+count is allowed for the caller according to subuid(5). A process is always allowed to map its own UID.

newuidmap can only be used once per process, as the kernel allows the uid 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/subuid

List of the user's subordinate user IDs.

/proc/[pid]/uid_map

Mapping of UIDs between user namespaces.

SEE ALSO

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

07/17/2026 account-utils 1.4.0