[CentOS] postgres 7 - CentOS 4.4

Tue Apr 10 12:59:25 UTC 2007
Luciano Miguel Ferreira Rocha <strange at nsk.no-ip.org>

On Tue, Apr 10, 2007 at 01:47:56PM +0100, Tom Brown wrote:
> 
> ># sudo -u postgres psql -f central.sql -q FOO foo
> >psql: FATAL:  IDENT authentication failed for user "foo"
> 
> OK - if i change that line to read
> 
> # sudo -u postgres psql -f central.sql -q FOO
> 
> that runs fine - So i need to find out from the application people what 
> the difference in those 2 commands is

The first connects as user foo to the database FOO, while the other
connects as the current user (postgres, after sudo).

If you do have a system user foo, you could sudo to it instead of
postgres:
# sudo -u foo psql -f central.sql -q FOO

>I have looked here and my 'trust' lines look like this
>
>host    all         all         127.0.0.1         255.255.255.255  trust
>host    all         all         192.168.11.238         255.255.255.255 trust

You're missing lines for local, as psql uses by default unix sockets (as
John Summerfield pointed out):
local all all trust

Note that this isn't very secure, as any user in the host can presume to
be any other user, so you should change trust to md5 and make sure you
have passwords defined for all postgres users.

-- 
lfr
0/0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.centos.org/pipermail/centos/attachments/20070410/f6ff8384/attachment-0005.sig>