Skip to main content
2 of 2
replaced http://unix.stackexchange.com/ with https://unix.stackexchange.com/

You can use pam-tmpdir for this. It creates a directory for each user that logs in, at the start of their PAM session.

See How to remount filesystem at logout? for a little more context...

In Debian, Ubuntu and derivatives it's available in libpam-tmpdir.

Stephen Kitt
  • 481.5k
  • 60
  • 1.2k
  • 1.4k