[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] PostgreSQL Password ? mmmmmm
- Subject: Re: [cobalt-users] PostgreSQL Password ? mmmmmm
- From: Mat Kovach <mkovach@xxxxxxxxxxxxxxxxx>
- Date: Tue Mar 7 05:36:34 2000
On Tue, Mar 07, 2000 at 01:50:08PM +0100, Francesc Leveque wrote:
: Hello,
:
: We have a new raq3, with postgresql installed. We are new to postgres and
: we have seen there are two users created: postgres and cobalt. Postgres
: requires a password, and we don't know it.
:
: Is there any doc to find some basic information about configuration?
This is a fun one..... I don't know if this is documented, and this is just
from my experience. If somebody knows a better way, please let me know.
By default, postgres does not have a password assigned, but it will be allowed
to connect unless you have one for it. Catch-22 there....
Your password for the user admin in postgres is in /etc/cobalt/.meta.id
So, if you want to connect as admin, you type
psql -u cobalt
username is admin
password (whatever is in /etc/cobalt/.meta.id).
Okay, this is what I did to assign a password to the user postgres. By
default there is not one so you have to assign one. You could play around with
the pg_hba.conf to not require encrpted password for the user postgres, but
why bother. Once you have a password assigned, you create users, etc.
in /home/pgsql/pg_hba.conf
[root@raqdev pgsql]# pwd
/home/pgsql
[root@raqdev pgsql]# more pg_hba.conf
local all crypt
check that to read
[root@raqdev pgsql]# more pg_hba.conf
#local all crypt
local all trust
This will now allow you to connect without passwords as the users.
su - postgres
psql template1
alter user postgres with password <password> \g
it should respond with:
ALTER USER
\q to exit.
exit
check /home/psql/pg_hba.conf back.
[root@raqdev pgsql]# more pg_hba.conf
local all crypt
ot@raqdev pgsql]# 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.2 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=> \q
**************************************************************
DO NOT MESS WITH THE COBALT DATABASE, it will foobar things :)
**************************************************************
**************************************************************
DO NOT MESS WITH THE COBALT DATABASE, it will foobar things :)
**************************************************************
**************************************************************
DO NOT MESS WITH THE COBALT DATABASE, it will foobar things :)
**************************************************************
http://www.postgresql.org for info on admin stuff for postgresql.
--
Mat Kovach mkovach@xxxxxxxxxxxxxxxxx
Cleveland Linux User Group http://cleveland.lug.net