REVNETGROUP(8)

๐Ÿ“ฆ
version 4.2 ยท 4 versions
, in debian bookworm, debian trixie, ubuntu jammy, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

๐Ÿ’– REVNETGROUP โ€” the revnetgroup page, but make it make sense ๐Ÿ’–

okay so bestie, you found the revnetgroup manual, and it's from the NIS Reference Manual, section 8 (that's the sysadmin-y section, the one with the big-girl tools ๐Ÿ’…). Buckle up, it's short but it's important, fr fr.


โœจ NAME โœจ

revnetgroup โ€” generate reverse netgroup data ๐ŸŒ€


๐ŸŒธ SYNOPSIS ๐ŸŒธ

/usr/lib/yp/revnetgroup [-u | -h]

๐Ÿฆ‹ DESCRIPTION ๐Ÿฆ‹

okay so revnetgroup is that girl who takes the standard input, reads it in netgroup(5) format, and flips it into what we call reverse netgroup form. and the way that works is so satisfying, let me explain ๐Ÿ’…

  • in the original file, you see netgroup memberships described as "which members live inside this particular group"
  • in reverse netgroup format, it's the other way around: it says which groups are associated with a particular member

and why do we care? because this info is used to generate the netgroup.byuser and netgroup.byhosts NIS maps. those reverse netgroup maps are literally there to speed up netgroup lookups, especially for the innetgr() library function. no cap, that's the whole point ๐Ÿƒโ€โ™€๏ธ๐Ÿ’จ

revnetgroup prints its results on the standard output. and ngl, it's usually only called by /var/yp/Makefile when it's rebuilding the NIS netgroup maps โ€” so it's giving backstage crew energy, not main character energy. iconic either way ๐Ÿ‘‘


๐ŸŽ€ OPTIONS ๐ŸŽ€

  • -u โ€” generate netgroup.byuser output; only the username information in the original netgroup file gets processed โœจ
  • -h โ€” generate netgroup.byhost output; only the hostname information in the original netgroup file gets processed ๐ŸŒˆ
heads up bestie: it's [-u | -h] โ€” the pipe means pick one, not both ๐Ÿซถ

๐Ÿ“ FILES ๐Ÿ“

  • /var/yp/Makefile โ€” the Makefile to build the NIS databases. yes, that Makefile. the one doing all the summoning ๐Ÿ”ฎ
  • /etc/netgroup โ€” the default netgroup database file. this file is most often found only on the NIS master server, so if you don't see it on your machineโ€ฆ that's not you being messy, that's just how it's set up ๐Ÿ’€

๐Ÿ’œ SEE ALSO ๐Ÿ’œ

getnetgrent(3), netgroup(5), ๐ŸŒธ


๐Ÿ‘‘ AUTHOR ๐Ÿ‘‘

revnetgroup was written by Thorsten Kukuk <kukuk@linux-nis.org>. absolute legend, we stan ๐Ÿซถโœจ


and that's the whole page, bestie!! this beauty comes from the NIS Reference Manual and the page is dated 12/31/2020, filed under REVNETGROUP(8). go forth and reverse those netgroups, you've got this ๐Ÿ’–๐ŸŒˆ๐Ÿฆ‹

๐Ÿ“ฆ where this page comes from