Search Postgresql Archives

Re: Password as a command line argument to createuser

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux