Re: password encryption

From: Joe Conway <mail(at)joeconway(dot)com>
To: Jodi Kanter <jkanter(at)virginia(dot)edu>
Cc: Postgres Admin List <pgsql-admin(at)postgresql(dot)org>
Subject: Re: password encryption
Date: 2002-10-03 15:48:23
Message-ID: 3D9C66C7.4070102@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Jodi Kanter wrote:
> We are currently using the pg_passwd utility to encrypt passwords.
> Someone here told me that I can now encrypt passwords within postgresql
> so that they are not stored in plain text in the pg_shadow file.
> Is this true? I cannot seem to find any mention of it in my postgresql
> books but it's quite possible that they were all written prior to the
> release of 7.2.

See http://www.postgresql.org/idocs/index.php?runtime-config.html , a bit more
than half way down:

"PASSWORD_ENCRYPTION (boolean)

When a password is specified in CREATE USER or ALTER USER without writing
either ENCRYPTED or UNENCRYPTED, this flag determines whether the password is
to be encrypted. The default is off (do not encrypt the password), but this
choice may change in a future release. "

You can change this in postgresql.conf. Note that ENCRYPTED is the default as
of 7.3.

Also see ALTER USER:
http://www.postgresql.org/idocs/index.php?sql-alteruser.html

And pg_hba.conf:
http://www.postgresql.org/idocs/index.php?client-authentication.html#PG-HBA-CONF
Look for md5.

The basic idea is that ENCRYPTED vs UNENCRYPTED default is controlled by
PASSWORD_ENCRYPTION in the postgresql.conf file.

ALTER USER can explicitly set a user's password as ENCRYPTED.

You need to modify pg_hba.conf to allow "md5" instead of "password"

HTH,

Joe

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Jun Tanamal 2002-10-04 02:43:41 affected by ISP/DNS change
Previous Message Jodi Kanter 2002-10-03 15:26:45 password encryption