There are several posts to the internet about this issue. I found no
solution to these posts either.
Here is a except from a post on the pgsql-bugs mailing list:
I have a problem with psql on Windows XP Pro. After an attempt to
connect to a database I get this error:
psql: FATAL: password authentication failed for user "<username>"
This happens both for local (Windows) and remote (Linux) database. Both
databases are easily accessible from other clients (psql for Linux,
pgAdmin III, jdbc).
The problem is that there is no password prompt even if I try to force
it by -W option. According to pg_hba.conf, there should be no need to
ask for password at all (local/all databases/trust).
There is the same error message in the postgresql log as on the screen
Version: psql (PostgreSQL) 8.0.0
Similar bug report: #1354
Another post on the internet indicates that you must change the
authentication type to trust or else you will not be able to
authenticate in a Windows environment.
Install Postgres 8.x (http://www.postgresql.org/download/). Requires
Windows 2000 or later and NTFS. See
http://pginstaller.projects.postgresql.org/FAQ_windows.html for more
* Create a regular windows user "postgres" with password "postgres".
THIS MUST NOT be an administrator account since the postgres server WILL
NOT RUN as an admin.
* Install as a service. Use the above postgres account as owner of
* Check /your_dir/data/pg_hba.conf file. Change md5 or password
methods to trust:
o host all all md5 change this to:
o host all all trust
* If you don't make this change, then running psql commands will
o psql: FATAL: password authentication failed for user
I was very surprised by this issue as well. I am just assuming that not
many people have a c:\dev directory on their machines where they run
postgreSQL from. That is the only way that you would be able to open the
file '/dev/tty', if the cwd is c:.
If I switch my cwd to a drive that does not have a dev directory at the
root, the problem goes away.
I realize that this seems unbelievable, but I think it is a *real*
Let me know what you think.
From: Tom Lane [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 22, 2006 2:02 PM
To: Robert Kinberg
Subject: Re: [PATCHES] [PATCH] Prompt for password on Windows platforms
"Robert Kinberg" <[EMAIL PROTECTED]> writes:
> The current version of psql, pg_dump, ... do not properly prompt the
> user for a password, when the backend database is setup for password
> authentication on a Windows platform.
Curious that you are the *only* person to have noticed such a
fundamental problem... please provide some evidence that this patch is
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend