Skip site navigation (1) Skip section navigation (2)

Re: Restarting with pg_ctl, users, and passwords.

From: johnf <jfabiani(at)yolo(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: Restarting with pg_ctl, users, and passwords.
Date: 2008-08-20 06:45:21
Message-ID: (view raw or whole thread)
Lists: pgsql-generalpgsql-novice
On Tuesday 19 August 2008 10:28:38 pm Matthew Pettis wrote:
> Hi,
> I just installed postgresql 8.3 on Ubuntu Heron with Postgis.  I've
> worked with this install on XP before, but not on Linux.  I'm having
> trouble telling if the postmaster is started.  But, maybe more root to
> the problem, I cannot log onto the database via 'psql' when I supply
> what I think I set as the correct password.
> I've created a database and can log into it and do stuff with the
> tables using psql.  However, I have a CGI app that wants to call the
> database (all on the same machine), but gets a 'FATAL: Ident
> authentication failed for user "postgres"' error.  now, while logged
> onto my Linux user account 'postgres', I can psql into my database
> without having to provide a password.  So, while in there, I issued
> the following SQL:
> ALTER USER postgres WITH PASSWORD 'postgres';
> now, I *thought* what that would do would be to allow me to issue the
> 'psql' command from my regular non-postgres Linux account and log in
> as long as I would issue:
> psql -d mydb -U postgres -W
> and then provide 'postgres' as the password as well, as I had changed
> it in mydb as previously stated.  But I am denied access when I try
> this from my account.  This is what is confusing to me.  I suspect
> that this may be at the core of why I cannot connect to mydb, but I am
> not sure, as I cannot even confirm that the database is running as I
> thought it would, since I don't know what process to look for in the
> 'ps -ef' dump.
> Please advise, thanks!
> Matt

I'm a NOVICE too.  So take what I say with a grain of salt.  

as root
ps -eaf | grep postmaster

will determine if the postgres is working.

The reason you can't connect is due to pg_hba.conf need to be setup correctly.  
Since, I don't really understand how to get postgres to use the standard 
linux user password file maybe to can post the answer if you get it working.

John Fabiani

In response to

pgsql-novice by date

Next:From: Tom LaneDate: 2008-08-20 13:05:48
Subject: Re: Restarting with pg_ctl, users, and passwords.
Previous:From: Tovo RabemanantsoaDate: 2008-08-20 06:33:35
Subject: Re: How do I determine my data dir for a created database for pg_ctl?

pgsql-general by date

Next:From: Roshni ManiDate: 2008-08-20 06:47:01
Subject: FW: syntax for Copy command via libpqxx
Previous:From: Shashwat_NigamDate: 2008-08-20 06:41:44
Subject: Regarding access to a user

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group