[Fwd: Re: Postgresql 8.1 on Debian]

Darrin Ritter darrinritter at optusnet.com.au
Sun May 14 01:00:09 CST 2006


I had a problem setting up postgrsql in fc4 with PostgreSQL 8.0.7

here´s a summary of what I had to do and I hope it helps

Darrin Ritter

had a bit of fun installing ogo onto Fedora Core 4. 

the trouble that I had was in setting up postgresql: 

the setup requires that I edit    ~postgres/data/pg_haba.conf     to
alter the following lines: 


snip %< 
# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD 
host  OGo    all    127.0.0.1 255.255.255.255    trust 

# "local" is for Unix domain socket connections only 
local   all         all                               ident sameuser 
# IPv4 local connections: 
host    all         all         127.0.0.1/32          ident sameuser 
# IPv6 local connections: 
host    all         all         ::1/128               ident sameuser 
host OGo all 127.0.0.1 255.255.255.255 trust 
local all all trust 
snip %< 

the problem that I found was that for PostgreSQL 8.0.7 it requires the
command:     pg_ctl reload     run as postgres user in order for the
pg_haba.conf  file to be recognized so that the command 

psql -h localhost OGo OGo 

will work, after I did this it all worked like it should. 




On Sat, 2006-05-13 at 09:01 +0930, David Lloyd wrote:
> In my /etc/postgresql/8.1/main/pg_hba.conf, I have:
> 
>  # "local" is for Unix domain socket connections only
>  local   all         all                               ident sameuser
>  local   all         all                               password
>  local   all         all                               md5
> 
> Now, as the postgres user I have tried:
> 
>  % createuser -A -E -P
>  Role Name: moodle
> 
>  [answer other questions]
> 
> Then I get:
> 
>  postgres % psql -Umoodle --password
>  password: [the correct password]
>  psql: FATAL:  Ident authentication failed for user "moodle"
> 
> No other authentication but 'local' has any mention of ident. 
> 
> I've tried this too:
> 
>  postgres % createuser -A -P
>  Role Name: moodle
> 
>  [answer other questions]
> 
> I am assuming I've got the correct pg_hba.conf because:
> 
>  # "local" is for Unix domain socket connections only
>  local   all         all                               trust
> 
> ...has the expected effect of allowing:
> 
>  postgres % psql -Umoodle --password
> 
> Of getting into psql:
> 
>  Welcome to psql 8.1.3, the PostgreSQL interactive terminal.
> 
>  Type:  \copyright for distribution terms
> 
>  [...]
> 
> That is to say, I think it's the right one because the moment I tell
> postgres to just trust the local domain socket everything works.
> 
> I've gotten password checking working before on postgres and can't
quite
> figure out what I've done wrong...any ideas?
> 
> Incidentally, I've removed that ident line and it still complains.
> 
> DSL
> 
> PS. I don't want to run the apache user as moodle, so what I'm trying
to
> do is to get another account to do something like this:
> 
>  lloy0076 % psql -Umoodle --password
>  password: correct_password
> 
>  [able to access the database 'moodle']
> 




More information about the linuxsa mailing list