Re: Password issue

From: "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>
To: "Mahmoud *EXTERN*" <mhhasan(at)gmx(dot)com>, <pgsql-general(at)postgresql(dot)org>
Subject: Re: Password issue
Date: 2011-05-20 08:25:55
Message-ID: D960CB61B694CF459DCFB4B0128514C20670D04A@exadv11.host.magwien.gv.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Emanuel Calvo 2011-05-20 09:02:57 Error compiling sepgsql in PG9.1
Previous Message Albe Laurenz 2011-05-20 08:19:04 Re: What's eating my space ?