Обсуждение: Not Finding password for Postgres user on linux

Поиск
Список
Период
Сортировка

Not Finding password for Postgres user on linux

От
"Nandu Garg"
Дата:
Hi All

I have just now got the Postgresql installed again. But again before connecting it it requires me to connect to
Postgresuser. Now how could I get connected. There is nothing mentioned in Postgre documentation about the default
password.Is the password allocated dynamically? 
My linux administrator says he could not find the password. Do I have to create a new user where it's group is
pg_databaseor what? 

Amol


Re: Not Finding password for Postgres user on linux

От
Dmitry Alyabyev
Дата:
Thursday, January 24, 2002, 9:13:22 AM, Nandu  Garg wrote:


> Hi All

> I have just now got the Postgresql installed again. But again before connecting it it requires me to connect to
Postgresuser. Now how could I get connected. There is nothing mentioned in Postgre 
> documentation about the default password. Is the password allocated dynamically?
> My linux administrator says he could not find the password. Do I have to create a new user where it's group is
pg_databaseor what? 

Take a look at data/pg_hba.conf file.
By default postgres allow connect without password for user 'postgres'
so you can type: psql -U postgres template1


--
Dimitry



Re: Not Finding password for Postgres user on linux

От
"Nandu Garg"
Дата:
Hi

I am connected to Linux $ prompt with user 'amol' which has Oracle DBA privileges. When I try to connect using
$su postgres       It prompts me for the password (which I donno) and when I issue $psql -U postgres Template1
I give me 'psql: invalid option -- U'
Therefore I tried small u i.e. I issued the command
'$psql -u postgres template1' It prompted me like this
Username: postgres
Password:

Connection to database 'postgres' failed.
FATAL 1:  Database postgres does not exist in pg_database

When It asked me for username I entered 'postgres' as username and  password I kept empty but still it gave me above
errormessge. I donno how suddenly it said 'database postgres ' does not exists because I entered postgres as username. 

Amol



On Thu, 24 Jan 2002 Dmitry Alyabyev wrote :
> Thursday, January 24, 2002, 9:13:22 AM, Nandu  Garg
> wrote:
>
>
> > Hi All
>
> > I have just now got the Postgresql installed again.
> But again before connecting it it requires me to
> connect to Postgres user. Now how could I get
> connected. There is nothing mentioned in Postgre
> > documentation about the default password. Is the
> password allocated dynamically?
> > My linux administrator says he could not find the
> password. Do I have to create a new user where it's
> group is pg_database or what?
>
> Take a look at data/pg_hba.conf file.
> By default postgres allow connect without password for
> user 'postgres'
> so you can type: psql -U postgres template1
>
>
> --
> Dimitry
>
>
>
> ---------------------------(end of broadcast)
> ---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org



Re: Not Finding password for Postgres user on linux

От
"Nandu Garg"
Дата:
Hi all

Just now I tried following

$psql -u template1
Username: postgres
Password:

Welcome to the POSTGRESQL interactive sql monitor:
  Please read the file COPYRIGHT for copyright terms of POSTGRESQL
[PostgreSQL 6.5.3 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66]

   type \? for help on slash commands
   type \q to quit
   type \g or terminate with semicolon to execute query
 You are currently connected to the database: template1

template1=>

Amol


On Thu, 24 Jan 2002 Dmitry Alyabyev wrote :
> Thursday, January 24, 2002, 9:13:22 AM, Nandu  Garg
> wrote:
>
>
> > Hi All
>
> > I have just now got the Postgresql installed again.
> But again before connecting it it requires me to
> connect to Postgres user. Now how could I get
> connected. There is nothing mentioned in Postgre
> > documentation about the default password. Is the
> password allocated dynamically?
> > My linux administrator says he could not find the
> password. Do I have to create a new user where it's
> group is pg_database or what?
>
> Take a look at data/pg_hba.conf file.
> By default postgres allow connect without password for
> user 'postgres'
> so you can type: psql -U postgres template1
>
>
> --
> Dimitry
>
>
>
> ---------------------------(end of broadcast)
> ---------------------------
> TIP 1: subscribe and unsubscribe commands go to
> majordomo@postgresql.org



Re: Not Finding password for Postgres user on linux

От
Justin Clift
Дата:
Hi Amol,

PLEASE upgrade to PostgreSQL 7+ !  The latest production-quality release
of PostgreSQL is 7.1.3, and if you've got a choice, that's your best
one.  :)

Versions of PostgreSQL older than version 7.x (you're running version
6.5.3) have some pretty nasty bugs in them, and because they're so old
we have difficulty in offering much in the way of assistance when you
have a problem.  :(

If you can upgrade, it'll give you a better (faster, more stable, more
powerful SQL capabilities, better crash recovery (if it ever crashes))
database, and it's also easier to tune for better performance.

Hope this helps.

:-)

Regards and best wishes,

Justin Clift


Nandu Garg wrote:
>
> Hi all
>
> Just now I tried following
>
> $psql -u template1
> Username: postgres
> Password:
>
> Welcome to the POSTGRESQL interactive sql monitor:
>   Please read the file COPYRIGHT for copyright terms of POSTGRESQL
> [PostgreSQL 6.5.3 on i686-pc-linux-gnu, compiled by gcc egcs-2.91.66]
>
>    type \? for help on slash commands
>    type \q to quit
>    type \g or terminate with semicolon to execute query
>  You are currently connected to the database: template1
>
> template1=>
>
> Amol
>
> On Thu, 24 Jan 2002 Dmitry Alyabyev wrote :
> > Thursday, January 24, 2002, 9:13:22 AM, Nandu  Garg
> > wrote:
> >
> >
> > > Hi All
> >
> > > I have just now got the Postgresql installed again.
> > But again before connecting it it requires me to
> > connect to Postgres user. Now how could I get
> > connected. There is nothing mentioned in Postgre
> > > documentation about the default password. Is the
> > password allocated dynamically?
> > > My linux administrator says he could not find the
> > password. Do I have to create a new user where it's
> > group is pg_database or what?
> >
> > Take a look at data/pg_hba.conf file.
> > By default postgres allow connect without password for
> > user 'postgres'
> > so you can type: psql -U postgres template1
> >
> >
> > --
> > Dimitry
> >
> >
> >
> > ---------------------------(end of broadcast)
> > ---------------------------
> > TIP 1: subscribe and unsubscribe commands go to
> > majordomo@postgresql.org
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

--
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
   - Indira Gandhi

Re: Not Finding password for Postgres user on linux

От
Holger Krug
Дата:
On Thu, Jan 24, 2002 at 09:27:15AM -0000, Nandu  Garg wrote:

> I give me 'psql: invalid option -- U'

You have an old version of psql.

> Therefore I tried small u i.e. I issued the command
> '$psql -u postgres template1' It prompted me like this

This old version requires: $psql -u template1

Please read the manpage of psql. The command line options of psql are
explained there in detail !

--
Holger Krug
hkrug@rationalizer.com