Related source files:
- https://github.com/Whonix/anon-base-files/blob/master/debian/anon-base-files.postinst
- security-misc/usr/share/pam-configs/mkhomedir-security-misc at master · Kicksecure/security-misc · GitHub
So package anon-base-files maintainer script debian/anon-base-files.postinst currently creates user user but without home folder.
Home folder is created on login using PAM mkhomedir.
That is the current implementation which fixes bug: not all files form /etc/skel are copied to /home/user.
What you describe sounds very much like the current implementation.
We could add a feature to skip creation of user user in https://github.com/Whonix/anon-base-files/blob/master/debian/anon-base-files.postinst.
Package live-config file /lib/live/config/0030-user-setup seems to be responsible for user creation? That script seems to have a lot parameters / options we can consider. It also does a lot stuff we need to understand. Can we consider to skip /lib/live/config/0030-user-setup and leave that to the existing implementation for greater simplicity and consistency (user user created everywhere the same as much as possible)? Looks like (by reading /lib/live/config/0030-user-setup) by setting LIVE_USERNAME=user we might be able to skip /lib/live/config/0030-user-setup. Untested. Could you try please?
Generally, should we use package live-config folder /lib/live/config/ as much or little as possible? We at least need an overview what /lib/live/config/ does to check if it compatible with what we want.