Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 489DC6500FF for ; Thu, 21 Aug 2008 06:23:04 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 66723-03-7 for ; Thu, 21 Aug 2008 06:22:31 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from blu0-omc4-s10.blu0.hotmail.com (blu0-omc4-s10.blu0.hotmail.com [65.55.111.149]) by postgresql.org (Postfix) with ESMTP id C3BFD650119 for ; Thu, 21 Aug 2008 06:16:51 -0300 (ADT) Received: from BLU149-W1 ([65.55.111.137]) by blu0-omc4-s10.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 21 Aug 2008 02:16:50 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_606517b4-3ad9-4ac9-a3c1-86a959698f0c_" X-Originating-IP: [59.160.193.34] From: Vishal Arora To: Shashwat_Nigam , Subject: Re: Regarding access to a user Date: Thu, 21 Aug 2008 14:46:50 +0530 Importance: Normal In-Reply-To: References: <48ABD192.EE98.0025.0@wicourts.gov> MIME-Version: 1.0 X-OriginalArrivalTime: 21 Aug 2008 09:16:50.0594 (UTC) FILETIME=[A4FA9020:01C9036E] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.607 tagged_above=0 required=5 tests=HTML_FONT_FACE_BAD=0.606, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200808/103 X-Sequence-Number: 29948 --_606517b4-3ad9-4ac9-a3c1-86a959698f0c_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi Shashwat=2C=20 =20 I presume your user is hmri and the database is hmri_database=2C is it corr= ect? =20 if yes - your pg_hba.conf entry should be as following (if you are connecti= ng to postgres on the same machine) host hmri_database hmri 127.0.0.1/32 md5 =20 Can you tell me what command are you using to connect to the server and wha= t environment is it? =20 Regards =20 Vishal=20 From: Shashwat_Nigam@satyam.comTo: aroravishal22@hotmail.com=3B pgsql-admin= @postgresql.org=3B Kevin.Grittner@wicourts.govCC: pgsql-general@postgresql.= org=3B pgsql-sql@postgresql.org=3B pgsql-admin@postgresql.orgDate: Thu=2C 2= 1 Aug 2008 14:35:43 +0530Subject: Re: [ADMIN] Regarding access to a user Dear Vishal=20 Thanks for the help but by doing this an error is generated at the time whe= n the user is trying to log in with the following message: =93 Access to database denied The server doesn't grant access to the database: the server reports=20 FATAL: no pg_hba.conf entry for host "127.0.0.1"=2C user "hmri"=2C database= "postgres"=2C SSL off=20 To access a database on a PostgreSQL server=2C you first have to grant prim= ary access to the server for your client (Host Based Authentication). Postg= reSQL will check the pg_hba.conf file if a pattern that matches your client= address / username / database is present and enabled before any SQL GRANT = access control lists are evaluated.=20 The initial settings in pg_hba.conf are quite restrictive=2C in order to av= oid unwanted security holes caused by unreviewed but mandatory system setti= ngs. You'll probably want to add something like=20 host all all 192.168.0.0/24 md5=20 This example grants MD5 encrypted password access to all databases to all u= sers on the private network 192.168.0.0/24.=20 You can use the pg_hba.conf editor that is built into pgAdmin III to edit t= he pg_hba.conf configuration file. After changing pg_hba.conf=2C you need t= o trigger a server configuration reload using pg_ctl or by stopping and res= tarting the server process. =93 Please provide futher proceedings Thanks & Regards=2C Shashwat Nigam | Software Engineer | Geographical Information System Satyam Computer Services Limited=2C Hyderabad | MOBILE: +919951467324 |=20 =20 From: Vishal Arora [mailto:aroravishal22@hotmail.com] Sent: Thursday=2C Aug= ust 21=2C 2008 2:29 PMTo: Shashwat_NigamCc: pgsql-admin@postgresql.orgSubje= ct: RE: [ADMIN] Regarding access to a user =20 > From: Shashwat_Nigam@satyam.com> To: Kevin.Grittner@wicourts.gov> CC: pgs= ql-general@postgresql.org=3B pgsql-sql@postgresql.org=3B pgsql-admin@postgr= esql.org> Date: Thu=2C 21 Aug 2008 14:23:51 +0530> Subject: Re: [ADMIN] Reg= arding access to a user> > Dear Kevin> Thanks for the help. But still the u= ser is able to see all the databases. I defined something like this> > # IP= v4 local connections:> host all all 127.0.0.1/32 md5> host HMRI_database hm= ri 127.0.0.1/32 md5You have to comment out the first entry made in your hba= file. In this case it checks for the first line where all users are allowe= d to access all databases so it does not checks the second line. > > in th= e above case hmri is user and HMRI_database. But still when user is log in = as 'hmri' it is able to access all the databases.> Please provide a solutio= n for the same.> > Thanks & Regards=2C> Shashwat Nigam> | Software Engineer= | Geographical Information System> Satyam Computer Services Limited=2C Hyd= erabad | MOBILE: +919951467324 |> > -----Original Message-----> From: Kevin= Grittner [mailto:Kevin.Grittner@wicourts.gov]> Sent: Wednesday=2C August 2= 0=2C 2008 6:41 PM> To: pgsql-admin@postgresql.org=3B Shashwat_Nigam> Cc: pg= sql-general@postgresql.org=3B pgsql-sql@postgresql.org> Subject: Re: [ADMIN= ] Regarding access to a user> > >>> Shashwat_Nigam wrote:> > > Now what I want is to set privilege that whenever the user = log in as> Us> > he can only see database Y=2C none other than that. The us= er Us could> have all> > rights for database Y but can't go for any other d= atabase (X or Z).> > The first thing you need to do is configure "host base= d> authentication":> > http://www.postgresql.org/docs/8.3/interactive/auth-= pg-hba-conf.html> > Among other things=2C this allows you to restrict which= users can> connect to which databases.> > -Kevin> > > DISCLAIMER:> This em= ail (including any attachments) is intended for the sole use of the intende= d recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COM= PANY INFORMATION. Any review or reliance by others or copying or distributi= on or forwarding of any or all of the contents in this message is STRICTLY = PROHIBITED. If you are not the intended recipient=2C please contact the sen= der by email and delete all copies=3B your cooperation in this regard is ap= preciated.> > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresq= l.org)> To make changes to your subscription:> http://www.postgresql.org/ma= ilpref/pgsql-admin Search for videos of Bollywood=2C Hollywood=2C Mollywood and every other wo= od=2C only on Live.com Try it now! DISCLAIMER:This email (including any attachments) is intended for the sole = use of the intended recipient/s and may contain material that is CONFIDENTI= AL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or cop= ying or distribution or forwarding of any or all of the contents in this me= ssage is STRICTLY PROHIBITED. If you are not the intended recipient=2C plea= se contact the sender by email and delete all copies=3B your cooperation in= this regard is appreciated. _________________________________________________________________ Searching for the best deals on travel? Visit MSN Travel. http://msn.coxandkings.co.in/cnk/cnk.do= --_606517b4-3ad9-4ac9-a3c1-86a959698f0c_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable
Hi Shashwat=2C
 =3B
I presume your user is hmri and the database is hmri_database=2C is it corr= ect?
 =3B
if yes - your pg_hba.conf entry should be as following (if you are connecti= ng to postgres on the same machine)


host =3Bhmri_database =3Bhmri 127.0.0.1/32= md5
 =3B
Can you tell me what command are you using to conn= ect to the server and what environment is it?
 =3B

Regards
 =3B
Vishal


From: Shashwat_Nigam@satyam.com
To: aroravishal22@hotmail.com=3B pgsql-a= dmin@postgresql.org=3B Kevin.Grittner@wicourts.gov
CC: pgsql-general@pos= tgresql.org=3B pgsql-sql@postgresql.org=3B pgsql-admin@postgresql.org
Da= te: Thu=2C 21 Aug 2008 14:35:43 +0530
Subject: Re: [ADMIN] Regarding acc= ess to a user


Dear Vishal

Thanks for the help but by doing th= is an error is generated at the time when the user is trying to log in &nbs= p=3Bwith the following message:

=93

Access to database denied

The server doesn't grant access to = the database: the server reports

FATAL: no pg_hba.conf entry for hos= t "127.0.0.1"=2C user "hmri"=2C database "postgres"=2C SSL off

To access a database on a PostgreSQ= L server=2C you first have to grant primary access to the server for your c= lient (Host Based Authentication). PostgreSQL will check the pg_hba.conf fi= le if a pattern that matches your client address / username / database is p= resent and enabled before any SQL GRANT access control lists are evaluated.=

The initial settings in pg_hba.conf= are quite restrictive=2C in order to avoid unwanted security holes caused = by unreviewed but mandatory system settings. You'll probably want to add so= mething like

host all all 192.168.0.0/24 md5

This example grants MD5 encrypted p= assword access to all databases to all users on the private network 192.168= .0.0/24.

You can use the pg_hba.conf editor = that is built into pgAdmin III to edit the pg_hba.conf configuration file. = After changing pg_hba.conf=2C you need to trigger a server configuration re= load using pg_ctl or by stopping and restarting the server process.<= /P>

=93

Please provide futher proceedings

Thanks &=3B Regards=2C

Shashwat Nigam

| Software = Engineer | =3BGeographical Information System

Satya= m Computer Services Limited=2C Hyderabad =3B| MOBILE<= /B>: +919951467324 =3B|&nb= sp=3B

 =3B

From: Vishal Arora [mailto:aroravishal22@ho= tmail.com]
Sent: Thursday=2C August 21=2C 2008 2:29 PM
To:= Shashwat_Nigam
Cc: pgsql-admin@postgresql.org
Subject:= RE: [ADMIN] Regarding access to a user

 =3B





<= /P>



>=3B From: Shashwa= t_Nigam@satyam.com
>=3B To: Kevin.Grittner@wicourts.gov
>=3B CC: = pgsql-general@postgresql.org=3B pgsql-sql@postgresql.org=3B pgsql-admin@pos= tgresql.org
>=3B Date: Thu=2C 21 Aug 2008 14:23:51 +0530
>=3B Sub= ject: Re: [ADMIN] Regarding access to a user
>=3B
>=3B Dear Kevi= n
>=3B Thanks for the help. But still the user is able to see all the = databases. I defined something like this
>=3B
>=3B # IPv4 local = connections:
>=3B host all all 127.0.0.1/32 md5
>=3B host HMRI_da= tabase hmri 127.0.0.1/32 md5

You =3Bhave to comment out the firs= t entry made in your hba file. In this case =3Bit checks for the first = line where all users are allowed to access all databases =3Bso it does = not checks the second line.  =3B

>=3B
>=3B in the above = case hmri is user and HMRI_database. But still when user is log in as 'hmri= ' it is able to access all the databases.
>=3B Please provide a soluti= on for the same.
>=3B
>=3B Thanks &=3B Regards=2C
>=3B S= hashwat Nigam
>=3B | Software Engineer | Geographical Information Syst= em
>=3B Satyam Computer Services Limited=2C Hyderabad | MOBILE: +91995= 1467324 |
>=3B
>=3B -----Original Message-----
>=3B From: K= evin Grittner [mailto:Kevin.Grittner@wicourts.gov]
>=3B Sent: Wednesda= y=2C August 20=2C 2008 6:41 PM
>=3B To: pgsql-admin@postgresql.org=3B = Shashwat_Nigam
>=3B Cc: pgsql-general@postgresql.org=3B pgsql-sql@post= gresql.org
>=3B Subject: Re: [ADMIN] Regarding access to a user
>= =3B
>=3B >=3B>=3B>=3B Shashwat_Nigam <=3BShashwat_Nigam@satya= m.com>=3B wrote:
>=3B
>=3B >=3B Now what I want is to set pr= ivilege that whenever the user log in as
>=3B Us
>=3B >=3B he c= an only see database Y=2C none other than that. The user Us could
>=3B= have all
>=3B >=3B rights for database Y but can't go for any other= database (X or Z).
>=3B
>=3B The first thing you need to do is = configure "host based
>=3B authentication":
>=3B
>=3B http:= //www.postgresql.org/docs/8.3/interactive/auth-pg-hba-conf.html
>=3B <= BR>>=3B Among other things=2C this allows you to restrict which users can=
>=3B connect to which databases.
>=3B
>=3B -Kevin
>= =3B
>=3B
>=3B DISCLAIMER:
>=3B This email (including any a= ttachments) is intended for the sole use of the intended recipient/s and ma= y contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. An= y review or reliance by others or copying or distribution or forwarding of = any or all of the contents in this message is STRICTLY PROHIBITED. If you a= re not the intended recipient=2C please contact the sender by email and del= ete all copies=3B your cooperation in this regard is appreciated.
>=3B=
>=3B --
>=3B Sent via pgsql-admin mailing list (pgsql-admin@po= stgresql.org)
>=3B To make changes to your subscription:
>=3B htt= p://www.postgresql.org/mailpref/pgsql-admin


Search for videos of Bollywood=2C Hollywood=2C Mollywo= od and every other wood=2C only on Live.com Try it now!<= /P>



DISCLAIMER:
This email (includi= ng any attachments) is intended for the sole use of the intended recipient/= s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMA= TION. Any review or reliance by others or copying or distribution or forwar= ding of any or all of the contents in this message is STRICTLY PROHIBITED. = If you are not the intended recipient=2C please contact the sender by email= and delete all copies=3B your cooperation in this regard is appreciated.


Searching for weekend getaways? Try Live.com Try i= t! = --_606517b4-3ad9-4ac9-a3c1-86a959698f0c_--