Re: Password as a command line argument to createuser - Mailing list pgsql-general

From Joshua D. Drake
Subject Re: Password as a command line argument to createuser
Date
Msg-id 4768B855.20601@commandprompt.com
Whole thread Raw
In response to Password as a command line argument to createuser  ("Jane Ren" <j2ren@ucsd.edu>)
List pgsql-general
Jane Ren wrote:
> Hi,
>
> I need to write a script that creates a new user with a password
> automatically.
>
> Is there a way I can specify the password as a command line argument to
> createuser?
>

Since you have access to the shell use psql -U user -c "create role ..."

Joshua D. Drake

> It looks like postgres does not read from stdin, but from /dev/tty.
>
> Thanks
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
>                http://archives.postgresql.org/
>


pgsql-general by date:

Previous
From: "Jane Ren"
Date:
Subject: Password as a command line argument to createuser
Next
From: Tom Lane
Date:
Subject: Re: Password as a command line argument to createuser