Re: [GENERAL] System admin - Mailing list pgsql-general

From Oliver Elphick
Subject Re: [GENERAL] System admin
Date
Msg-id 199810041914.UAA19579@linda.lfix.co.uk
Whole thread Raw
In response to System admin  (John Guthrie <jimmer@charm.net>)
List pgsql-general
John Guthrie wrote:
  >Is there a good guise for system admin?  I am stumped on the most
  >mundane problem right now: how do I set user passwords in postgresql?
  >When I createuser I never get prompted for a password, when I run psql
  >with no parameters I get right in, but if I run:
  > "psql -u someone"
  >I get a password prompt - also perl/DBI looks like it wants a password.

The external command createuser does not prompt for a password.

Use CREATE USER or ALTER USER as SQL commands:

template1=> \h create user
Command: create user
Description: create a new user
Syntax:
create user <user_name>
        [with password <password>]
        [createdb | nocreatedb]
        [createuser | nocreateuser]
        [in group <group_1>, ..., <group_n>]
        [valid until '<abstime>'];

template1=> \h alter user
Command: alter user
Description: alter system information for a user
Syntax:
alter user <user_name>
        [with password <password>]
        [createdb | noccreatedb]
        [createuser | nocreateuser]
        [in group <group_1>, ..., <group_n>]
        [valid until '<abstime>'];

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
               PGP key from public servers; key ID 32B8FAA1
                 ========================================
     "For the word of God is quick, and powerful, and
      sharper than any twoedged sword, piercing even to the
      dividing asunder of soul and spirit, and of the joints
      and marrow, and is a discerner of the thoughts and
      intents of the heart."        Hebrews 4:12



pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] Re: More PostgreSQL stuff
Next
From: "postgres"
Date:
Subject: [Question] Help me with programming in C/C++