Re: Add user on old database with password

From: "A(dot)Bhuvaneswaran" <bhuvan(at)symonds(dot)net>
To: Ramesh PAtel <ramesh(at)banas(dot)guj(dot)nic(dot)in>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Add user on old database with password
Date: 2003-06-13 11:49:08
Message-ID: Pine.LNX.4.44.0306131713550.1360-100000@Bhuvan.bksys.co.in
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> 1) create one user with password and all Grant on Database. it is a admin
> user

The below steps would help:

$ su - postgres
$ createuser your_user
Shall the new user be allowed to create databases? (y/n) y
Shall the new user be allowed to create more new users? (y/n) y
CREATE USER

Use GRANT command to grant privileges to specified user.

> 2) i want to add password to postgres user.

1) If the authentication mode is trust then it is simple. Connect to any
database as postgres and using alter user you must be able to set password
for postgres user.

2) If the authentication mode is any other, then you may not be able to
connect to any database as postgres user, since you didn't set password
for postgres user. So, set the authentication mode to trust and restart
postmaster and repeat step one to set password for postgres user. Finally
restore the authentication mode.

regards,
bhuvaneswaran

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message kopra 2003-06-13 13:23:05 Re: DUMPall PG7.1.3 restore to PG7.3.2
Previous Message Ramesh PAtel 2003-06-13 05:18:45 Add user on old database with password