Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 352972

Summary: dev-db/postgresql-base-8.4.5 (PAM authentication)
Product: Gentoo Linux Reporter: Tully Gray <shadowdaemon>
Component: [OLD] ServerAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: minor CC: titanofold
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Tully Gray 2011-01-27 17:29:22 UTC
dev-db/postgresql-base has no PAM configuration file which prevents users from authenticating through PAM to the Postgres server. Furthermore, if PAM auth is specified in pg_hba.conf (I only tested the local connection type) then the Postgres server will start but the rc service is never marked as "started". To fix this I created the file "/etc/pam.d/postgresql" which allows me to authenticate using PAM. However I'm not sure what the correct contents of this file should be. Please see additional information.

Reproducible: Always

Steps to Reproduce:
1. Emerge and configure dev-db/postgresql-server.
2. Edit pg_hba.conf to use the "pam" authentication method.

Actual Results:  
Attempting to start the Postgres rc-script will appear to fail, however the server will still be started. Cannot authenticate to server using PAM, other methods will still work if the server is configured to use them.

Expected Results:  
Can use PAM authentication to connect to server. Server runs and "rc-service postgresql-8.4 status" will show service as being started.

# PAM configuration file which I've used to fix the problem.
# I'm not sure if this is the correct setup.

auth       include      system-services
account    include      system-services
password   include      system-services
session    include      system-services
Comment 1 Tully Gray 2011-01-27 17:48:29 UTC
Oops, it seems that "system-services" is used for cron, it has
"auth sufficient pam_permit.so" which allows automatic authentication.
Comment 2 Aaron W. Swenson gentoo-dev 2011-01-27 17:59:33 UTC
Duplicate of bug 302384
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2011-01-28 08:39:02 UTC

*** This bug has been marked as a duplicate of bug 302384 ***