On Wed, Dec 19, 2007 at 10:38:52AM -0500, Tom Lane wrote:
> reading the password from /dev/tty, so if you want to script this, you'd
> be stuck with making a special-purpose program that didn't.
But given that passwords are sort of awful in this way anyway, why not use
something designed not to ha
Greg Smith <[EMAIL PROTECTED]> writes:
> In your typical shell nowadays the echo command is a built-in one--it
> executes directly rather than calling a separate echo binary, so it won't
> leak what you tell it onto a command line. That means this line in a
> script would be simplest way to do
On Wed, 19 Dec 2007, A. Kretschmer wrote:
psql -U ... database -c "create user foo password 'secret';"
This seems like a reasonable example, but it will also show the password
you're assigning on the command line to anybody who happens to run ps,
which is the reason why this isn't allowed by
am Tue, dem 18.12.2007, um 22:04:13 -0800 mailte Jane Ren folgendes:
> 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?
>From a unix shell? You can call psql with -
"Jane Ren" <[EMAIL PROTECTED]> writes:
> Is there a way I can specify the password as a command line argument to
> createuser?
No, and it would be a really bad idea if you could, as the password
would be exposed to everyone else on the machine (via "ps") while
createuser runs.
There are various w
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 po
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?
It looks like postgres does not read from stdin, but from /dev/tty.
Thanks
---(end of broadcast)--