pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
problem in logging into database
7+ messages / 4 participants
[nested] [flat]

* problem in logging into database
@ 2006-12-07 13:41  ankit.mehrotra@tcs.com
  0 siblings, 2 replies; 7+ messages in thread

From: ankit.mehrotra@tcs.com @ 2006-12-07 13:41 UTC (permalink / raw)
  To: pgsql-admin

I am new to using postgres. I working on version 8.0.

I have created a number of users in the database but I am not able to log 
into it using any of them, where in logging into using user postgres is 
successfull .... the commands that i am using are 

-- createuser -a -d -P "username"

for logging into , i am using 
-- psql -U "username"

In all the references online, it says that the process shud work.
The postmaster service and databases are running.


=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: problem in logging into database
@ 2006-12-07 14:31  Adam Radlowski <adamr@informatyka.gdansk.pl>
  parent: ankit.mehrotra@tcs.com
  1 sibling, 0 replies; 7+ messages in thread

From: Adam Radlowski @ 2006-12-07 14:31 UTC (permalink / raw)
  To: ankit.mehrotra@tcs.com; +Cc: pgsql-admin

Did You specified the database ? In PostgreSQL You are logging into 
database, not into DBMS, like in MySQL.
For test users try template1 first, for example psql -h yourhost -U 
somebody -d template1
Did You grant those users rights to database wchich they are connecting 
to ?
Regards
Adam

ankit.mehrotra@tcs.com wrote:

>
>
> I am new to using postgres. I working on version 8.0.
>
> I have created a number of users in the database but I am not able to 
> log into it using any of them, where in logging into using user 
> postgres is successfull .... the commands that i am using are
>
> -- createuser -a -d -P "username"
>
> for logging into , i am using
> -- psql -U "username"
>
> In all the references online, it says that the process shud work.
> The postmaster service and databases are running.
>
>
>=====-----=====-----=====
>Notice: The information contained in this e-mail
>message and/or attachments to it may contain 
>confidential or privileged information. If you are 
>not the intended recipient, any dissemination, use, 
>review, distribution, printing or copying of the 
>information contained in this e-mail message 
>and/or attachments to it are strictly prohibited. If 
>you have received this communication in error, 
>please notify us by reply e-mail or telephone and 
>immediately and permanently delete the message 
>and any attachments. Thank you
>
>
>  
>




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: problem in logging into database
@ 2006-12-07 14:38  Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  parent: ankit.mehrotra@tcs.com
  1 sibling, 1 reply; 7+ messages in thread

From: Rajesh Kumar Mallah @ 2006-12-07 14:38 UTC (permalink / raw)
  To: ankit.mehrotra@tcs.com <ankit.mehrotra@tcs.com>; +Cc: pgsql-admin

On 12/7/06, ankit.mehrotra@tcs.com <ankit.mehrotra@tcs.com> wrote:
>
>
> I am new to using postgres. I working on version 8.0.
>
> I have created a number of users in the database but I am not able to log
> into it using any of them,

Hi,

Could you please paste the ERROR message you get.

regds
mallah.


where in logging into using user postgres is
> successfull .... the commands that i am using are
>
> -- createuser -a -d -P "username"
>
> for logging into , i am using
> -- psql -U "username"
>
> In all the references online, it says that the process shud work.
> The postmaster service and databases are running.
>
>
>  =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>
>



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: problem in logging into database
@ 2006-12-08 09:44  ankit.mehrotra@tcs.com
  parent: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  0 siblings, 2 replies; 7+ messages in thread

From: ankit.mehrotra@tcs.com @ 2006-12-08 09:44 UTC (permalink / raw)
  To: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>; +Cc: pgsql-admin

my postmaster is on the same machine . i am pasting the command and its 
output here for u :-

%  psql -d template1 -U postgres
psql: FATAL:  Ident authentication failed for user "postgres"

Please do guide.

Ankit Arun Mehrotra
Tata Consultancy Services
Mailto: ankit.mehrotra@tcs.com
Website: http://www.tcs.com
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you

^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: problem in logging into database
@ 2006-12-08 10:12  imad <immaad@gmail.com>
  parent: ankit.mehrotra@tcs.com
  1 sibling, 0 replies; 7+ messages in thread

From: imad @ 2006-12-08 10:12 UTC (permalink / raw)
  To: ankit.mehrotra@tcs.com <ankit.mehrotra@tcs.com>; +Cc: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>; pgsql-admin

specify the user which did initdb.

--Imad
www.EnterpriseDB.com


On 12/8/06, ankit.mehrotra@tcs.com <ankit.mehrotra@tcs.com> wrote:
>
> my postmaster is on the same machine .. i am pasting the command and its
> output here for u :-
>
> %  psql -d template1 -U postgres
> psql: FATAL:  Ident authentication failed for user "postgres"
>
> Please do guide.
>
>  Ankit Arun Mehrotra
>  Tata Consultancy Services
>  Mailto: ankit.mehrotra@tcs.com
>  Website: http://www.tcs.com=====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>
>
>



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: problem in logging into database
@ 2006-12-08 10:14  Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  parent: ankit.mehrotra@tcs.com
  1 sibling, 1 reply; 7+ messages in thread

From: Rajesh Kumar Mallah @ 2006-12-08 10:14 UTC (permalink / raw)
  To: ankit.mehrotra@tcs.com <ankit.mehrotra@tcs.com>; +Cc: pgsql-admin

On 12/8/06, ankit.mehrotra@tcs.com <ankit.mehrotra@tcs.com> wrote:
>
> my postmaster is on the same machine .. i am pasting the command and its
> output here for u :-
>
> %  psql -d template1 -U postgres
> psql: FATAL:  Ident authentication failed for user "postgres"

You will need to modify pg_hba.conf file in the directory which you
initdb'ed and restart the database.

this file is well documented and reading it is a good investment.
There are several options to allow connecting . mentioned
below are roughly in order or security. you need to add/modity
/uncomment the lines near the end of this file.


local   all         all                               trust   # very trivial

will allow any user to connect from same machine to any database without
any password.

local   all         all                               md5

(same a above but will ask password)

host    all         all         192.168.0.100/32      md5

(same a above but allows connection from said address range)

you can choose any config based on your requirement but make
sure it secure enough eventually.


Regds
mallah.



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: problem in logging into database
@ 2006-12-08 12:03  ankit.mehrotra@tcs.com
  parent: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
  0 siblings, 0 replies; 7+ messages in thread

From: ankit.mehrotra@tcs.com @ 2006-12-08 12:03 UTC (permalink / raw)
  To: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>; +Cc: pgsql-admin; pgsql-admin-owner@postgresql.org

thanx  for the suggestion ... it just clicked !!

Ankit Arun Mehrotra
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you

^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2006-12-08 12:03 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-12-07 13:41 problem in logging into database ankit.mehrotra@tcs.com
2006-12-07 14:31 ` Adam Radlowski <adamr@informatyka.gdansk.pl>
2006-12-07 14:38 ` Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
2006-12-08 09:44   ` ankit.mehrotra@tcs.com
2006-12-08 10:12     ` imad <immaad@gmail.com>
2006-12-08 10:14     ` Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
2006-12-08 12:03       ` ankit.mehrotra@tcs.com

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox