Re: postgres phpgroupware login woes

From: Oliver Elphick (olly_at_lfix.co.uk)
Date: 08/26/04

  • Next message: Roy Pluschke: "Re: International Characters from a US Keyboard?"
    To: Lance Hoffmeyer <lance@august.net>
    Date: Thu, 26 Aug 2004 09:33:03 +0100
    
    

    On Thu, 2004-08-26 at 05:30, Lance Hoffmeyer wrote:
    > Running SARGE. I have everything installed
    > and appears to be installed correctly. If
    > I login as user postgres I can login to
    > a database phpgroupware. If I am any other
    > user and I run command
    >
    > psql phpgroupware -U postgres -W
    >
    > I get error
    >
    > psql: FATAL: IDENT authentication failed for user "postgres"
    >
    > also, I cannot create phpgroupware database from phpgroupware
    > admin?
    >
    > What have I got setup incorrectly?

    I don't know the insides of phpgroupware, but let me explain
    PostgreSQL's authentication.

    You connect either as a local client using Unix sockets (hostname is
    blank) or through TCP/IP with or without SSL (hostname is not blank);
    these three modes of access are represented in
    /etc/postgresql/pg_hba.conf by lines beginning "local", "host-ssl" or
    "host" respectively.

    You connect to a specified database as a specified user. If you are
    connecting through TCP/IP you are coming from some particular host.
    The first line in pg_hba.conf to match the combination of access mode,
    database, user and (for TCP/IP only) source IP address is the line that
    governs how your access is authenticated.

    The default access mode in Debian PostgreSQL is "ident sameuser"; this
    means that the postmaster checks that the database user being requested
    is the same as the system login. This means that you can access
    PostgreSQL securely without having to enter a password every time you
    connect.

    When you access through the web, you cannot use ident authentication
    because the system user requesting access is the owner of the webserver
    (usually www-data) rather than yourself; so web-based database access
    must use passwords - specify authentication mode "md5" in pg_hba.conf.
    Remember you must set passwords for all users with ALTER USER WITH
    PASSWORD xxxxxxx before you change the authentication mode. A user with
    no password cannot get in at all.

    I presume that phpgroupware is the same kind of animal; it must be
    running under some other user name, so it cannot use ident
    authentication; you must specify md5 authentication mode in the
    pg_hba.conf line that governs the connection. If you want to avoid
    having the same change made for all accesses, arrange to have
    phpgroupware connect to hostname localhost (thus using TCP/IP) while
    default psql access will be to a blank hostname, thus using a Unix
    socket. The two different access modes can have different
    authentication, as explained above.

    Oliver Elphick
    maintainer

    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Roy Pluschke: "Re: International Characters from a US Keyboard?"

    Relevant Pages

    • Re: Cant connect to databases through Enterprise Manager
      ... Login to Query analyzer using Windows Authentication ... >How to change the default database of your existing ... >> verify SQL Server is running and check your SQL Server ...
      (microsoft.public.sqlserver.connect)
    • Re: Need al little AAA authentication help....
      ... upon login with ssh. ... aaa authentication enable default enable ... the database. ... authentication solution such as Radius server referencing an Active ...
      (comp.dcom.sys.cisco)
    • Re: Need al little AAA authentication help....
      ... upon login with ssh. ... aaa authentication enable default enable ... it says that there is no database called local, ...
      (comp.dcom.sys.cisco)
    • Re: Sql Server Login
      ... > When i'm using Server Explorer, I have a small red x next to all the ... > Which is better for creating the database on one computer and then ... login credential you need to, you have to set the SQL Server/MSDE instance ... SQL Server uses a so called "2 phase" authentication policy: ...
      (microsoft.public.sqlserver.msde)
    • [Full-Disclosure] Advisory: Dark Age of Camelot - Weak encryption of network traffic exposed persona
      ... Weak encryption in game client exposed customer billing and authentication ... encryption for billing information. ... The login binary has undergone several updates since then. ...
      (Full-Disclosure)