Thomas Schuster <thom(dot)schuster(at)gmx(dot)de> writes:
> my problem:
> createdb test
> psql -U john -d test -W
> password:******
> psql: FATAL: password authentication failed for user "john"
Given the facts you show, the most obvious explanation is that you
entered the wrong password. You might want to do an ALTER USER PASSWORD
command (as the superuser) just to make sure you didn't fat-finger the
password setting initially.
If that isn't it, try looking into the postmaster log to see if it logs
any additional details about the failure.
regards, tom lane