Thread: Not Finding password for Postgres user on Linux

Not Finding password for Postgres user on Linux

From
"Nandu Garg"
Date:
Hi all

I have again got installed PGSQL on my Linux machine. However again it asks me to get connected to Postgres user for
Linux.Now I have gone through installations and nowhere I found any default password for postgres user. Does the the
passwordis generated dynamically during user creation? Do I have to create a new Liunx user to create database on
PGSQL?I am still a new user for PGSQL and shifted from Oracle DBA to it. In Oracle these things were not a problem.
Therewas SYS and shadow user like 'internal'. But this thing is giving me problem like anything. My Linux Admin also
don'tknow the password for Postgres user. 

Amol


Re: Not Finding password for Postgres user on Linux

From
Holger Krug
Date:
On Thu, Jan 24, 2002 at 07:41:44AM -0000, Nandu  Garg wrote:
> I have again got installed PGSQL on my Linux machine. However again
> it asks me to get connected to Postgres user for Linux. Now I have
> gone through installations and nowhere I found any default password
> for postgres user. Does the the password is generated dynamically
> during user creation? Do I have to create a new Liunx user to create
> database on PGSQL? I am still a new user for PGSQL and shifted from
> Oracle DBA to it. In Oracle these things were not a problem. There was
> SYS and shadow user like 'internal'. But this thing is giving me
> problem like anything. My Linux Admin also don't know the password for
> Postgres user.

The default password for the postgres user is empty.

To connect as the postgres user to database template1 you have to call
psql as follows:

psql -U postgres template1

--
Holger Krug
hkrug@rationalizer.com

Re: Not Finding password for Postgres user on Linux

From
Thomas Lockhart
Date:
> However again it asks me to get connected to Postgres user for Linux.

If you installed from RPMs, then the *system* account for the Postgres
user has a disabled password by default. You will need to ask your
sysadmin to set the password for you before you can log in to that
account (unless you su to that account via the root account first; I
gather that you do not have root privs on that machine).

> Now I have gone through installations and nowhere I found any default
> password for postgres user.

There are two possible accounts (and passwords) to consider, and your
description has left us confused over which you are asking about. You
will need to set a password for the system account, as mentioned above,
and as others have mentioned the *PostgreSQL* account for the Postgres
user has an empty password by default.

Once you have created another user in the database, say "amol", with
full privileges you will find that you do not need to be the Postgres
user very often.

hth

                   - Thomas