I am trying to setup a system users are allowed to login on a system, but there actions
are not persisted. pam_namespace is very helpful there since it gives me a way to setup
tmpfs-based /tmp and /var/tmp for each session. What I am missing is a way to give access
to the homedirectory for a user, but not persist any changes. Using aufs seems to be a
good solution: just setup a temporary directory (like pam_namespace already does), but
instead of doing a bind-mount to the desired location use aufs to layer the temporary
space on top of an existing space. This should (famous last words) be reasonably easy to
add to pam_namespace. Configuration could be something like this:
# Create a /private/home/$USER directory, and layer that on home of $HOME
$HOME /private/home/$USER level,union
# Add a tmpfs on top of $HOME, so the home directory contents remains available
# but all changes are automatically lost on logout.
$HOME unused tmpfs,union
Is there any interested in adding this to linux-pam itself?
Regards,
Wichert.
Show replies by date