Skip site navigation (1) Skip section navigation (2)

Re: Postgres superuser & password on Red Hat; upgrade?

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Laurel Williams <tech(at)clearwater-inst(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Postgres superuser & password on Red Hat; upgrade?
Date: 2001-01-17 21:13:59
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Laurel Williams wrote:
  >The only way I can become Postgres is to log in as myself (Laurel), 
  >become substitute user--root by typing "su" and entering the root 
  >password, then typing su - postgres--thus bypassing the postgres 
  >password. But that makes Postgres also root, which I understand to be 
  >very bad thing. I have used this technique to make Laurel a database 

No, this is not the case.  su makes you become the user named, root by
default.  Your first su makes you root; the second one makes you
postgres.  This is perfectly OK and the right way to do it.

  >user, but how can I make Postgres a DBA login with full privileges who 
  >is NOT root? What is the method to give Postgres a new password and/or 
  >discover the old one? 

ALTER USER postgres WITH PASSWORD newpassword;

You need createuser privileges to use CREATE USER or ALTER USER.

Oliver Elphick                                Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight                    
PGP: 1024R/32B8FAA1: 97 EA 1D 47 72 3F 28 47  6B 7E 39 CC 56 E4 C1 47
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
     "And, behold, I come quickly; and my reward is with me,
      to give every man according as his work shall be."    
                               Revelation 22:12 

pgsql-novice by date

Next:From: Ken CoreyDate: 2001-01-17 22:29:59
Subject: Re: Yikes! Bitten by line length?
Previous:From: Johnathon SmithDate: 2001-01-17 18:51:18

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group