I have a computer room that uses libpam-pgsql and libnss-pgsql2 for users authentication. Right now, the system is working perfectly with Debian 8 clients.
I want to upgrade and I am trying to setup Debian 10 clients to work with the same setup, but it doesn't work.
getent, id, and authentication process itself works but i can't get a shell nor a graphical session with sddm. Connecting with ssh to one of the Debian 10 clients with a user stored in PostgreSQL database it shows the MOTD (Message of the day) and the last login time, but nothing more. There is no shell, no prompt. Running ps from another terminal as root, I can see the bash process of the remote user, but the user can't do anything that requires interaction.
As root I can run something that doesn't require a tty, like
sudo -u 285803 touch /tmp/testfile (being 285803 a user stored in postgresql database) and it works. The file is there and belongs to right user a right group.
oct 16 15:01:23 sala-puesto99 systemd-logind: Could not connect to database oct 16 15:01:23 sala-puesto99 sshd: pam_systemd(sshd:session): Failed to create session: No such file or directory
The "Could not connect to database" appears when a non-root user try to access shadow DB. I don't know how is this possible as systemd-logind is running as root. The "No such file or directory" can't be about home path, as the path exists and belongs to the user.
I think it must be something related to tty access, pam_systemd or systemd-logind.
Any help, please?