innetgr(1)
β¨ innetgr β bestie's guide to checking netgroup membership β¨
okay so real talk, this is innetgr(1), one of the NSS utilities, and it's genuinely so useful it's not even funny. sit down, hydrate, let's go π
π NAME π
innetgr β check netgroup membership. that's it. that's the whole job. she checks if someone (or something) is in a netgroup π
πΈ SYNTAX πΈ
innetgr [-d domain] [-h host] [-u user] [-v] <netgroup>
yes the netgroup goes last, no she will not be moving it, periodt.
π¦ DESCRIPTION π¦
so here's the vibe: innetgr checks whether the user, host, or domain you gave her is a member of the netgroup you handed her. that's the entire mission, and she ate π
no cap, the program produces no output at all unless you pass the verbose (-v) flag. like, she's silent. mysterious. main character energy fr fr. she's not gonna chat, she's just gonna know, and you're gonna have to read her exit status to find out what she thinks.
speaking of which, the exit status is the whole plot twist:
- exit status
0β the user/host/domain combo is a member of the given netgroup π - exit status
1β the combination was not found in the group π - exit status
2β one of the arguments is invalid π
lowkey keep those three numbers memorised, they're doing all the communicating here.
π OPTIONS π
--domain <domain>,-d <domain>β search in the given domain. tell her which domain to look in bestie β¨--host <host name>,-h <host name>β search for the given host name π₯οΈ--user <user name>,-u <user name>β search for the given user name π«Ά--verbose,-vβ enable verbose mode. she'll actually talk to you now π--version,-Vβ show version information. (capital V, don't get it twisted π)
π EXAMPLES π
okay so say you wanna check if the current host is listed in the netgroup allhosts. you'd run this, exactly:
if innetgr -h `uname -n` allhosts ; then echo "Found"; fi
the way that uname -n is sitting in there grabbing the hostnameβ¦ iconic. it's giving resourceful. it's giving she-read-the-docs πβ¨
π CONFORMING TO π
a innetgr program first appeared in NetBSD 1.4. so she's been around. she's not new here. she's a legacy queen π
π AUTHORS π
Petter Reinholdtsen <pere@hungry.com> β thank you for your service bestie π«‘π
π SEE ALSO π
getent(1) netgroup(1) innetgr(3) netgroup(5) nsswitch.conf(5)
like go read those too, iykyk, the lore goes deep π§
and that's the whole page, bestie!! π this was innetgr(1) from the NSS utilities, version 1.1, by Petter Reinholdtsen β mwah, no notes, go check your netgroups πβ¨π¦
π¦ where this page comes from
- debian bookworm: ng-utils 1.1-1 Β· GPL-2.0-or-later
- debian trixie: ng-utils 1.1-2 Β· GPL-2.0-or-later
- ubuntu noble: ng-utils 1.1-1 Β· GPL-2.0-or-later
- ubuntu questing: ng-utils 1.1-2
- ubuntu resolute: ng-utils 1.1-2build1 Β· GPL-2.0-or-later
- ubuntu stonking: ng-utils 1.1-2build1 Β· 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