Re: Password issue - Mailing list pgsql-general

From Albe Laurenz
Subject Re: Password issue
Date
Msg-id D960CB61B694CF459DCFB4B0128514C20670D04A@exadv11.host.magwien.gv.at
Whole thread Raw
In response to Password issue  (Mahmoud <mhhasan@gmx.com>)
List pgsql-general
Mahmoud wrote:
> I am trying to create a database by passing arguments to createdb.exe
> but createdb always asks me about the password although I passed  -W 123
> to it.
>
> How can I override password request?
>
> PS
> This my test for creating the database
> createdb.exe -U postgres -W 123 -O admin -e test

As has been mentioned, -W takes no arguments and prompts you for a password.

If you want a password, but don't want the prompt (e.g. because you are
writing a script), you could:

- Not use -W, then the superuser will have no password initially.
- Start the server.
- Using "trust" authentication, connect to a database.
- Issue "ALTER ROLE ... PASSWORD '...'" to set a password.

Yours,
Laurenz Albe



pgsql-general by date:

Previous
From: "Albe Laurenz"
Date:
Subject: Re: What's eating my space ?
Next
From: Emanuel Calvo
Date:
Subject: Error compiling sepgsql in PG9.1