PAM

From: EMOTO Masahiko <emo(at)nifs(dot)ac(dot)jp>
To: pgsql-admin(at)postgresql(dot)org
Subject: PAM
Date: 2002-12-04 01:59:43
Message-ID: 87lm361r3k.wl@dgpc1.nifs.ac.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-patches


Does anyone show me a sample of PAM authenticate file?

I want to use pam for client authentication, and I create pg_hba.cnf as,

>host all all 127.0.0.1 255.255.255.255 trust
>host all all 192.168.0.0 255.255.0.0 pam postgresql

and /etc/pam.d/postgresql as
>auth required /lib/security/pam_stack.so service=system-auth
>account required /lib/security/pam_stack.so service=system-auth

I tried to connect to the server, but failed. The messages I received were follows;

>[CLIENT]
>% psql -h dgpc1 db1 -U emo
>Password:
>psql: FATAL: PAM authentication failed for user "emo"
>
>[SERVER]
>DEBUG: reaping dead processes
>DEBUG: child process (pid 15642) exited with exit code 0
>DEBUG: BackendStartup: forked pid=15643 socket=8
>DEBUG: received PAM packet
>LOG: CheckPAMAuth: pam_authenticate failed: 'Authentication failure'
>FATAL: PAM authentication failed for user "emo"
>DEBUG: proc_exit(0)
>DEBUG: shmem_exit(0)
>DEBUG: exit(0)
>DEBUG: reaping dead processes

The user account exists in the database, and I typed the system password.

Environment:
OS : Linux Kernel 2.4.19
PostgreSQL 7.3

By the way, what really I want to do is to configure the server behave like FTP servers;
All the users except the guest (anonymous) requires the password authentication.
The guest user can only read the data, and cannot alter the data.
Are there any solutions to do this?

--- EMOTO Masahiko ---

Responses

  • Re: PAM at 2002-12-05 14:01:00 from Tim Frank

Browse pgsql-admin by date

  From Date Subject
Next Message marwede, henning 2002-12-04 07:08:07
Previous Message Jack Flak 2002-12-04 01:09:42 Re: dumb question: how to get a list of databases?

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2002-12-04 05:20:41 Re: [HACKERS] pg_stat_database shows userid as OID
Previous Message Bruce Momjian 2002-12-03 22:08:57 Re: openbsd getpeereid(), local ident