NEWIDMAPD(8)
โจ newidmapd โ the manual page, bestie edition โจ
okay so you picked up the NEWIDMAPD(8) page, congrats, you're about to be obsessed ๐ this is the newidmapd corner of the account-utils universe and it is lowkey doing SO much heavy lifting behind the scenes. let's get into it.
๐ธ NAME ๐ธ
newidmapd, newidmapd.service, newidmapd.socket โ the daemon that sets UID and GID mappings for user namespaces ๐
๐ฆ SYNOPSIS ๐ฆ
newidmapd.service
newidmapd.socket
/usr/libexec/newidmapd [OPTIONS...]
โจ DESCRIPTION โจ
so newidmapd is a systemd(1) socket-activated service, and its whole vibe is: it does the privileged write of UID and GID mappings into a process's user namespace, on behalf of unprivileged callers. like, it's the friend who's allowed into the VIP section and it picks up the phone for you ๐ซถ
writing to /proc/pid/uid_map and /proc/pid/gid_map normally requires elevated privileges โ which is, frankly, a lot. so newidmapd takes requests over a Varlink socket, validates them, and writes the mappings itself. the payoff? tools like newuidmap(1) and newgidmap(1) need no setuid bit. no cap ๐ฅ iconic behavior.
before it writes any mapping, newidmapd runs a vibe check, and it verifies:
- the calling process owns the target process โ meaning the
/proc/piddirectory is owned by the caller's UID and GID. - every requested subordinate ID range is listed for the caller in
/etc/subuid(for UID mappings) or/etc/subgid(for GID mappings). heads up: a process is always allowed to map its own UID or GID. - the number of mapping entries does not exceed the kernel limit of 340 ranges (enforced since Linux 4.16).
and when systemd(1) launches it via socket activation, the daemon exits automatically after 30 seconds of inactivity. it knows when to leave the party ๐
๐ OPTIONS ๐
-s,--socketโ turns on socket activation mode. here the daemon inherits the listening socket from systemd and dips out automatically after 30 seconds of idle time. this is the standard mode when running under systemd.-d,--debugโ debug mode, i.e. maximum log verbosity. it will tell you everything, no filter.-v,--verboseโ verbose logging, the chill middle child of log levels.-?,--helpโ gives you the help list. the little menu, the lay of the land.--versionโ prints the program version. slay.
๐ฎ VARLINK INTERFACE ๐ฎ
newidmapd exposes the interface org.openSUSE.newidmapd over the Varlink socket /run/account/newidmapd-socket. the interface hands out these methods:
WriteMappings
writes UID or GID mappings for the user namespace of a given process. the caller must own the target process. the requested ranges get validated against /etc/subuid or /etc/subgid, whichever one is appropriate for the job.
Input fields:
PID(int) โ process ID of the target process whose namespace mapping is going to be written.Map(string) โ which mapping file to write. must be eitheruid_maporgid_map. it's giving very specific.MapRanges(array of MapRange) โ array of mapping entries. each entry is aMapRangeobject with three integer fields:upper(first ID inside the namespace),lower(first ID outside the namespace), andcount(length of the range). at most 340 entries are accepted.
Output fields:
Success(bool) โ whether the operation succeeded.ErrorMsg(string, optional) โ a human-readable error description on failure.
Ping
returns Alive=true if the service is running. so useful for checking the daemon is reachable before you go issuing other calls. it's the "you up?" text of the Varlink world ๐
Quit
requests the daemon to stop. you can optionally supply an integer ExitCode; it will be used as the process exit status.
SetLogLevel
adjusts the maximum log level at runtime. the Level field uses BSD syslog integer values (0 = emergency ... 7 = debug).
GetEnvironment
returns the daemon's current environment block as an array of strings in KEY=VALUE form.
and the interface also defines these error types:
org.openSUSE.newidmapd.PermissionDeniedโ the caller doesn't own the target process, or the requested mapping ranges aren't permitted by the subordinate ID configuration.org.openSUSE.newidmapd.InvalidParameterโ a required parameter was missing, out of range, or otherwise invalid.org.openSUSE.newidmapd.InternalErrorโ an unexpected internal error happened while processing the request. ๐ญ
๐ FILES ๐
/usr/libexec/newidmapdโ the daemon binary itself, the main character ๐/run/account/newidmapd-socketโ the Varlink socket used to talk to the daemon. created with mode0666so any local user can connect./etc/subuidโ defines the subordinate UID ranges allocated to each user. consulted when validatinguid_maprequests./etc/subgidโ defines the subordinate GID ranges allocated to each user. consulted when validatinggid_maprequests./proc/pid/uid_mapโ kernel file that gets written to apply UID mappings to a user namespace./proc/pid/gid_mapโ kernel file that gets written to apply GID mappings to a user namespace.
๐ SEE ALSO ๐
newuidmap(1), newgidmap(1), subuid(5), subgid(5), user_namespaces(7), systemd(1)
ok bestie that's the whole page, every last flag and field present and accounted for, no notes ๐
and for the cute sign-off: this whole thing comes from account-utils version 1.4.0, dated 07/17/2026 โ so yeah, she's recent, she's maintained, she's that girl ๐ซถโจ
๐ฆ where this page comes from
- ubuntu stonking: account-utils 1.4.0-1 ยท GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms