SUBGID(5) File Formats and Configuration SUBGID(5)

.SH "NAME" subgid - the configuration for subordinate group ids

.SH "DESCRIPTION"

.PP Subgid authorizes a group id to map ranges of group ids from its namespace into child namespaces.

.PP The delegation of the subordinate gids can be configured via the *subid* field in /etc/nsswitch.conf file. Only one value can be set as the delegation source. Setting this field to *files* configures the delegation of gids to /etc/subgid. Setting any other value treats the delegation as a plugin following with a name of the form *libsubid\_$value.so*. If the value or plugin is missing, then the subordinate gid delegation falls back to *files*.

.PP Note, that **newusers**, **useradd**, and **usermod** will only create entries in /etc/subgid if subid delegation is managed via subid files.

.SH "LOCAL SUBORDINATE DELEGATION"

.PP Each line in /etc/subgid contains a user name and a range of subordinate group ids that user is allowed to use. This is specified with three fields delimited by colons (“:”). These fields are:

• login name or UID

.RE

• numerical subordinate group ID

.RE

• numerical subordinate group ID count

.RE

.PP This file specifies the group IDs that ordinary users can use, with the **newgidmap** command, to configure gid mapping in a user namespace.

.PP Multiple ranges may be specified per user.

.PP When large number of entries (10000-100000 or more) are defined in /etc/subgid, parsing performance penalty will become noticeable. In this case it is recommended to use UIDs instead of login names. Benchmarks have shown speed-ups up to 20x.

.SH "FILES"

.PP /etc/subgid

Per user subordinate group IDs.

.RE  
.PP /etc/subgid-

Backup file for /etc/subgid.

.RE

.SH "SEE ALSO"

.PP [**login.defs**(5)](/man/os/shadow/login.defs.5), [**newgidmap**(1)](/man/os/shadow/newgidmap.1), [**newuidmap**(1)](/man/os/shadow/newuidmap.1), [**newusers**(8)](/man/os/shadow/newusers.8), [**subuid**(5)](/man/os/shadow/subuid.5), [**useradd**(8)](/man/os/shadow/useradd.8), [**userdel**(8)](/man/os/shadow/userdel.8), [**usermod**(8)](/man/os/shadow/usermod.8), [**user\_namespaces**(7)](/man/os/shadow/user_namespaces.7).

08/29/2026 shadow-utils 4.20.2

---

Document: subgid(5) from shadow 4.20.2-r1 (Chainguard OS)
Source: https://github.com/shadow-maint/shadow
