Score:1

Allowing Linux accounts to log into PostgreSQL db

th flag

I have Ubuntu server with several users. I want to allow any of those users to access a PostgreSQL database installed also in that server using their respective Linux usernames and passwords without having to use the SQL CREATE USER/ROLE. Is this possible? What could be needed if those users use LDAP to login into that server?

Thanks in Advance

pt flag
I don't think there's any way to get postgres to auto-create a postgres account when someone first connects. An alternative solution would be to iterate through your user accounts and pre-create them in postgres.
Neppomuk avatar
am flag
LDAP will only work for authenticating _existing_ PostgreSQL users, as set forth in the PostgreSQL documentation, 19.3.8. "LDAP Authentication".
Score:1
am flag

You issue looks as if it could be solved by using a GSSAPI-based single sign-on. It's not an easy task to set up a GSSAPI realm, but PostgreSQL supports it when the corresponding database server instance has been built with the GSSAPI option. See the PostgreSQL doc, section 19.3.3. GSSAPI Authentication, for details.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.