How to enable automatic md5 password prompting when connecting to PostgreSQL

From: Tom Wallick <tomwallick(at)yahoo(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: How to enable automatic md5 password prompting when connecting to PostgreSQL
Date: 2005-03-11 06:51:14
Message-ID: 20050311065114.30529.qmail@web54004.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

How can I automatically have PostgreSQL prompt for a
password everytime I do the following to connect to my
sample databaase 'movies'?

I installed the database correctly to exact
instructions in the INSTALL doc in the PostgreSQL
source directory in /usr/local and it is now
registered as a daemon in the LINUX run level scripts
started when the system boots.

I assigned a password to the Administrator account
which is by default 'postgres' and to a second user (
the second was created with 'createuser tomwallick'
command which successfully echoed with the CREATE USER
message.

However, no password was issued for the new user
'tomwallick' when I initially created the user.

Then in the administrator handbook, I saw that I could
create a password after the fact with the ALTER USER
command.

I used md5 password authentication, rather than the un
encryped regular password athentication when issuing
the passwords for both 'postgres' and 'tomwallick'
users.

Here is how I did this, which works but I must pass
the -W flag to the psql command to startup the
database in order to be prompted to type in a
password.

EXAMPLE:

psql -d movies -U tomwallick -W

I was simply expecting to simply just type:

EXAMPLE:

psql -d movies -U tomwallick

and as a result have the

password:

prompt request the password AUTOMATICALLY.

How can I clean/flush out the md5 passwords I
originally created and start over alter the two user
accounts 'postgres' and 'tomwallick' to simply have
regular password athentication. Keep in mind
'postgres' account is actually the administrator.

Or is it normal for my database to force me to type in
the -W flag to force me to enter in my password.

Help on this subject please.

Tom Wallick


__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Miroslav Šulc 2005-03-11 07:14:25 Re: Unicode!
Previous Message Tom Lane 2005-03-11 04:41:29 Re: 7.4.5 file write issue