PAM_GROUPNET(8)

✨ NAME ✨

pam_groupnet β€” the PAM module that lets you join (or create!) a specific network namespace right at login, bestie πŸ’–


🌸 SYNOPSIS 🌸

pam_groupnet.so

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen. the pam_groupnet PAM module lets every user in the groupnet group join a specific network namespace. like, their own lil vibe zone for networking 🫢

If the network namespace you specified exists, pam runs the user shell inside that namespace. If it does not exist? no worries bestie, it gets created during the login process. main character energy fr fr ✨

The system administrator gets to pick which network namespace to join by making groups whose names start with groupnet-. Whatever text you write after the dash? that's the network namespace name to join or create. Users just… join it at login. iconic πŸ’…

If a user is in multiple groups starting with groupnet-, the first one that matches wins. The group testing order is whatever getgrouplist(3) hands back β€” so it's giving "trust the process" 😭

πŸŽ€ OPTIONS πŸŽ€

  • group=groupname β€” the module operates on users in the group groupname- instead of groupnet-. yes, with the dash. don't forget the dash πŸ’–
  • lodown β€” leave the localhost lo interface in the state DOWN. just. down. as in, not up 🫠
  • rootshared β€” leave the root filesystem / as shared so mounts can propagate out to the parent namespace. Warning: this feature can create security vulnerabilities if not properly used. no cap, be careful with this one 🚨

⭐ RETURN VALUES ⭐

  • PAM_IGNORE β€” user does not belong to any groupnet-* group. not their era, moving on πŸ™ˆ
  • PAM_ABORT β€” error in retrieving the user id or in the namespace creation/joining. something went wrong wrong 😭
  • PAM_SUCCESS β€” success. we ate πŸ‘‘βœ¨

🌈 EXAMPLES 🌈

Add the following line to /etc/pam.d/sshd or /etc/pam.d/login:

session   required  pam_groupnet.so

literally copy paste and slay πŸ’…


πŸ’œ SEE ALSO πŸ’œ

pam.conf(5), pam.d(5), pam(7)


🧚 AUTHOR 🧚

pam_groupnet was written by Renzo Davoli and Eduard Caizer, University of Bologna πŸŽ“


VirtualSquare Labs β€’ August 17, 2016 β€” that's the source, the version vibe, and the date, babes. go forth and namespace responsibly πŸ“πŸ’–βœ¨

πŸ“¦ where this page comes from