title: psql: FATAL: PAM authentication failed for user
body: <p>PostgreSQL 9.2.4</p>
  
  <p>I cannot login anymore with a user that has worked in the past. I assume a configuration problem. So for testing I created a test user role 'testing' with the same options as the role in question (as the 'postgres' user who is still possible to login!):</p>
  
  <p><code>CREATE ROLE testing WITH SUPERUSER NOCREATEDB NOCREATEROLE LOGIN PASSWORD 'pw';</code></p>
  
  <p>The role was created successfully:</p>
  
  <pre>
                                    List of roles
       Role name  |                   Attributes                   | Member of
      ------------+------------------------------------------------+-----------
       postgres   | Superuser, Create role, Create DB, Replication | {}
       testing    | Superuser                                      | {}
       ...
  </pre>
  
  <p>However, a login results in this message:</p>
  
  <pre>
  # psql -h 127.0.0.1 -p 5434 -U testing
  Password for user testing:
  psql: FATAL:  PAM authentication failed for user "testing"
  FATAL:  PAM authentication failed for user "testing"
  </pre>
  
  <p>I also get this error when I try with the original role.</p>
  
  <p>pg_hba.conf:</p>
  
  <pre>
  # "local" is for Unix domain socket connections only
  local   all         all                               pam
  # IPv4 local connections:
  host    all         all         0.0.0.0/0             pam
  </pre>
  
  <p>Does anybody have a clue what the problem might be?</p>