I want to achieve a delay with the login over ssh on a Linux Server.
I will describe the scenario and why I might need that:
- I have a CIFS mount on the server (Domain joined) over fstab with multiuser option
- The user has his home directory on this mount which is managed by ACLs and MS AD
- with cifscreds the user authenticates himself against the AD to access the specified folder
- the home folder location ist specified by the sssd config
- the cifscreds credentials is handed over by pam in the login process
Now to the Problem: The user initially logs onto the server (Domain joined) with his AD credentials and successfully enters the server. But the process is to fast for cifscreds so I will get an error on the first login and land on root /. The user does not have the rights to be on the mounted "home folder" at this time. A second later he would be. So he logs off and back in, keyring is read, permission granted and he is in his mounted home directory.
So I need a delay in the whole ssh login process, so he reaches his home directory after the credentials are stored in the keyring.
Any ideas? Thanks in advance