0

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.

journalctl shows:

oct 16 15:01:23 sala-puesto99 systemd-logind[1497]: Could not connect to database
oct 16 15:01:23 sala-puesto99 sshd[1793]: 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?

0

I will answer myself. Maybe it could be useful for other people.

I have found that the login works when nscd is running.

When nscd is running I can login perfectly. When nscd is not running it doesn't work.

There is a reference to a similar problem at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=279581 It's a 2004 bug but it seems that the patch was written against a previous release (1.3.1) and can't be applied to current (1.4)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.