innetgr(1)

πŸ“¦
version 1.1 Β· 2 versions
  • 1.1 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 1.0 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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 πŸ’–βœ¨πŸ¦‹