Unlock open zfs data set on debian user login
22:21 29 Jan 2026

I have a Debian system with Gnome and open zfs that I am trying to set up as an NAS for multiple users. I've created a pool, rpool, and it has a global data set of the same name. For each user I want to create an encrypted sub data set that mounts and unlocks when they log in and locks and unmounts when the user logs out or times out.

to do this I'm try to adapt either section 5.1.2.1 or 5.1.2.2 from the following tutorial: https://wiki.archlinux.org/title/ZFS.

I would prefer to use the PAM method (5.1.2.1) but thus fare I have not had any luck and I'm not sure how to debug what's going on. I've also had try the script method (5.1.2.2) however I can't seem to get the script to run when my test user logs in.

I've tried to keep my configuration as default as possible but I've also installed Cockpit and cockpit-zfs-manager for easy of use. rpool was configured using this tool and consist of 3 drives with raidz1.

debian pam zfs