Template for dynamically created users' homes?

Hello,

Jupyterhub works fine with systemdspawner and DynamicUsers=true. User homes are created in /var/lib/private/{loginname}. By default, newly created homes have several hidden directories. Is there a way to use a template, like /etc/skel is used for creating homes for regular users?

systemdspawner relies on systemd to do everything

I’m not aware of a way to have systemd pre-populate user directories, but if you find out how we can try and working out how to pass that system config into the spawner.

Alternatively you could override Spawner.cmd to run your own script that copies content into a user directory if it’s not present, with the last line of the script calling something like exec jupyterhub-singleuser "$@"

1 Like