PAM_NEWNET(8)
π pam_newnet(8) β the login-time network-namespace glow-up π
System Manager's Manual Β· section 8 Β· yes bestie, this is the one that yeets your login session into its own little network bubble π«§
β¨ NAME β¨
pam_newnet β create a new network namespace at login π¦
β¨ SYNOPSIS β¨
pam_newnet.so
That's it. That's the whole synopsis. No flags on the module line itself, no args, nothing. She's lowkey mysterious like that π
β¨ DESCRIPTION β¨
So the pam_newnet PAM module creates a brand new network namespace at login, but only for the girlies in the newnet group π
Here's the vibe: users in the newnet group can log in over a network connection (like, say, via ssh, totally normal), but their processes cannot communicate. Like, at all. The only interface they can even see is the localhost of the namespace that got made at login time. That's the whole world they get. One (1) localhost. Main character energy in a room with no doors π
When pam_newnet is used together with a specific cado(1) configuration, users can configure their own networking services π οΈ (peep https://github.com/rd235/cado)
And then there's the nsutils tools β more specifically netnsjoin(1) β which let users assign placeholders to keep namespaces alive, assign meaningful tags so management is actually easy, and then later join any of their own namespaces π (peep https://github.com/rd235/nsutils)
β¨ OPTIONS β¨
group=groupnameβ the module operates on users in the group groupname instead ofnewnet. Custom group name? Slay, you do you πlodownβ leave the localhostlointerface in the stateDOWN. She's not getting up. She's resting π
β¨ RETURN VALUES β¨
PAM_IGNOREβ user does not belong to thenewnetgroup. Not your girl, not your namespace, moving on πPAM_ABORTβ error in retrieving the user id or in the namespace creation. Something went wrong wrong πPAM_SUCCESSβ success. We ate. Periodt β¨
β¨ EXAMPLES β¨
Add the following lines to /etc/pam.d/sshd or /etc/pam.d/login:
session required pam_newnet.so
session required pam_newnet.so group=lonet lodown
Copy-paste-able, iconic, no notes π
β¨ SEE ALSO β¨
pam.conf(5), pam.d(5), pam(7) β go read these, iykyk π
β¨ AUTHOR β¨
pam_newnet was written by Renzo Davoli and Eduard Caizer, University of Bologna π
VirtualSquare Labs Β· October 5, 2019 Β· and yeah this was PAM_NEWNET(8) the whole time π
Ok that's the page bestie, go namespace responsibly, ily, bye π«ΆπΈ
π¦ where this page comes from
- debian bookworm: libpam-net 0.3-2 Β· GPL-2.0-or-later
- debian trixie: libpam-net 0.4-1 Β· GPL-2.0-or-later
- ubuntu jammy: libpam-net 0.3-1 Β· GPL-2.0-or-later
- ubuntu noble: libpam-net 0.3-2 Β· 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