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

From Tom Lane
Subject Re: Password as a command line argument to createuser
Date
Msg-id 11107.1198045400@sss.pgh.pa.us
Whole thread Raw
In response to Password as a command line argument to createuser  ("Jane Ren" <j2ren@ucsd.edu>)
List pgsql-general
"Jane Ren" <j2ren@ucsd.edu> 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 ways to do this securely, but putting the password
on a program's command line isn't one of them.  I'd suggest looking
at how psql's \password command does it.

            regards, tom lane

pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Password as a command line argument to createuser
Next
From: "A. Kretschmer"
Date:
Subject: Re: Password as a command line argument to createuser