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 withgroupnet-, the first one that matches wins. The group testing order is whatevergetgrouplist(3)hands back β so it's giving "trust the process" π
π OPTIONS π
group=groupnameβ the module operates on users in the groupgroupname-instead ofgroupnet-. yes, with the dash. don't forget the dash πlodownβ leave the localhostlointerface in the stateDOWN. 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 anygroupnet-*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 π
π§ 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
- debian trixie: libpam-net 0.4-1 Β· GPL-2.0-or-later
- ubuntu questing: libpam-net 0.4-1
- ubuntu resolute: libpam-net 0.4-1build1 Β· GPL-2.0-or-later
- ubuntu stonking: libpam-net 0.4-1build1 Β· 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