If I then log in with a domain user and there is no local /home/[user] it is created by pam_mkhomedir.
So far so good.
Is there any way to adapt this process so that a directory for the domain user is also created on the local computer under /local/?
In a second step the user’s home directory will be mounted via pam_mount (CIFS). But many desktop programs have problems when the directory ~/.local/… is on the network.
At the first login of a domain user it is checked if the directory /local/$DOMAIN_USER exists. If not it will be created. With pam_mount I mount the CIFS home share during the user login:
/local/$DOMAIN_USER /home/$DOMAIN_USER/.local bind 0 0
This at the very end after \$SERVER$DOMAIN_USER is already mounted via CIFS-Mount to /home/$DOMAIN_USER.
Could this approach work?