Re: changing the password of postres

From: Prabu Subroto <prabu_subroto(at)yahoo(dot)com>
To: Postgres General Milis <pgsql-general(at)postgresql(dot)org>
Subject: Re: changing the password of postres
Date: 2004-09-07 11:35:06
Message-ID: 20040907113506.91850.qmail@web41809.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear Gunduz....

It's solved now. Thank you very much for your help.

But I still have one question...

How can I grant privilege to a user on all tables
under a database.

for example the database name is "kv".
What I need is something like this:
"
create user sven with password 'his_password';
grant all on kv.* to sven;
"

Please tell me.

Thank you very much.
--- Devrim GUNDUZ <devrim(at)gunduz(dot)org> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> Hi,
>
> On Tue, 7 Sep 2004, Prabu Subroto wrote:
>
> > Each time if I want to connect to postgres with
> > postgres I do like this:
> > "
> > patrixlinux(at)patrix:~> su
> > Password:
> > patrix:/localhome/patrixlinux # su postgres
> > postgres(at)patrix:/localhome/patrixlinux> cd
> > postgres(at)patrix:~> psql kv
> > Welcome to psql 7.4.2, the PostgreSQL interactive
> > terminal.
>
> Or you could run this command with "any" user
> without su:
>
> # psql kv -U postgres
>
> > So now, the user "postgres" still has no password.
> > How can I create the password for the user with
> psql?
>
> ALTER USER will do it.
>
> ALTER USER postgres WITH ENCRYPTED PASSWORD
> 'yourpassword';
> (Don't forget the quotes...)
>
> Also, you must enable password auth:
>
>
http://www.postgresql.org/docs/current/static/client-authentication.html
>
http://www.postgresql.org/docs/current/static/client-authentication.html#EXAMPLE-PG-HBA.CONF
>
> Then reload postgresql...
>
> > How can I create an account and its password with
> sql
> > query from psql?
>
> CREATE USER username WITH ENCRYPTED PASSWORD
> 'yourpassword';
>
> See \h CREATE USER in psql for details.
>
> > And how can I define that they have
> > the privilege to work with a database and some
> > tables....?
>
> See the SQL keyword GRANT .
>
>
http://www.postgresql.org/docs/7.4/static/sql-grant.html
>
> Regards,
> - --
> Devrim GUNDUZ
> devrim~gunduz.org devrim.gunduz~linux.org.tr
> http://www.tdmsoft.com
> http://www.gunduz.org
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.1 (GNU/Linux)
>
>
iD8DBQFBPZaFtl86P3SPfQ4RAoPXAJsGtWfePMGM6TwQNxHMJNGO/kd81wCfcyiA
> KTiehpw329znOng2CgteNc0=
> =zOVs
> -----END PGP SIGNATURE-----
>


__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message John DeSoi 2004-09-07 11:50:04 Re: Postgresql and scripting
Previous Message Tore Halset 2004-09-07 11:33:52 ERROR: canceling query due to user request