Thread: System admin

System admin

From
John Guthrie
Date:
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.
--
John Guthrie

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.2

mQCNAzO9DYwAAAEEALqNTjAdKq5+cGdGTI14O4mfXeL++zZYZ1Ybz9CpQTI+NXWV
Y6gy5PzKyCs0T2vlu/NAl4YG8kP2Cj95OSet1e4HFzZMeqryTCu/hwuusifo36DR
hGjWqyeNhvhGAm6Sux+xo84ridtCC0u5kilzxswP4RdMz73XHSNa1L76oY0RAAUR
tCJKb2huIEQuIEd1dGhyaWUgPGpndXRocmllQGFjbS5vcmc+
=lC2G
-----END PGP PUBLIC KEY BLOCK-----

Re: [GENERAL] System admin

From
"Oliver Elphick"
Date:
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