SUBGID(5)

๐Ÿ’– SUBGID(5) โ€” the vibe โœจ

okay bestie, welcome to the subgid manual page, aka the configuration for subordinate group ids. it lives in the File Formats and Configuration corner of the manual-verse and honestly? it's giving underrated icon. let's get into it ๐Ÿซถ


๐ŸŒธ NAME ๐ŸŒธ

subgid โ€” the configuration for subordinate group ids. that's it, that's the name, periodt.


โœจ DESCRIPTION โœจ

so. Subgid authorizes a group id to map ranges of group ids from its namespace into child namespaces. yes queen, delegation. ๐Ÿ’…

the delegation of the subordinate gids can be configured via the subid field in the /etc/nsswitch.conf file. and listen โ€” only one value can be set as the delegation source. one. singular. main character only. ๐Ÿ‘‘

  • 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 (she's resilient, she's fine, she recovers ๐Ÿ’…)
โš ๏ธ note bestie, and this is important: newusers, useradd, and usermod will only create entries in /etc/subgid if subid delegation is managed via subid files. no files, no entries. simple as that. ๐ŸŽ€

๐ŸŒˆ LOCAL SUBORDINATE DELEGATION ๐ŸŒˆ

each line in /etc/subgid contains a user name and a range of subordinate group ids that user is allowed to use. and it's specified with three fields delimited by colons (":"). the three fields are:

  • login name or UID
  • numerical subordinate group ID
  • numerical subordinate group ID count

that's it. three little colon-separated besties holding the whole thing together. ๐Ÿฅน

this file specifies the group IDs that ordinary users can use, with the newgidmap command, to configure gid mapping in a user namespace. iykyk. ๐Ÿ”ฅ

multiple ranges may be specified per user โ€” go off, stack them ranges, she can hold more than one. โœจ

๐Ÿ˜ญ okay but here's the cautionary tale: 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. twenty. times. faster. that's not a vibe check, that's a whole vibe upgrade. ๐Ÿš€

๐ŸŽ€ FILES ๐ŸŽ€

  • /etc/subgid โ€” Per user subordinate group IDs.
  • /etc/subgid- โ€” Backup file for /etc/subgid.

๐Ÿ‘‘ SEE ALSO ๐Ÿ‘‘

login.defs(5), newgidmap(1), newuidmap(1), newusers(8), subuid(5), useradd(8), userdel(8), usermod(8), user_namespaces(7).


and that's the whole page, bestie!! you ate this read fr fr ๐Ÿ’– this little masterpiece is brought to you by shadow-utils 4.20.0, dated 07/30/2026 โ€” mwah, love u, go configure some subordinate group ids responsibly ๐Ÿฆ‹๐ŸŒธ

๐Ÿ“ฆ where this page comes from