Обсуждение: pg_hba.conf and password files

Поиск
Список
Период
Сортировка

pg_hba.conf and password files

От
Markus Wagner
Дата:
Hi,

I use a pg_hba.conf like this:

local    all                        trust
host    all    127.0.0.1    255.255.255.255        trust
host    all    134.93.64.0    255.255.255.0        password    usr.txt

In usr.txt I made one entry "test:test". When I connect with Access, the DSN 
dialog appears, and I enter "test" and "test" in the corresponding fields for 
username and password. The connect fails, and the postgres.log says: "user 
'wagner' not found in password file". It seems that the username "test" does 
not make it to the backend, and my Windows username "wagner" is sent instead.

Any hints?

Thanks,

Markus


Re: pg_hba.conf and password files

От
Gary Stainburn
Дата:
Hi Markus,

I can't help you with the Access problem, but I'll just mention that creating 
usr.txt line that won't work, as the password needs to be encrypted.  Use the 
pg_passwd program to create the user details and it will encrypt it for you.

Gary

On Tuesday 07 August 2001 10:26 am, Markus Wagner wrote:
> Hi,
>
> I use a pg_hba.conf like this:
>
> local    all                        trust
> host    all    127.0.0.1    255.255.255.255        trust
> host    all    134.93.64.0    255.255.255.0        password    usr.txt
>
> In usr.txt I made one entry "test:test". When I connect with Access, the
> DSN dialog appears, and I enter "test" and "test" in the corresponding
> fields for username and password. The connect fails, and the postgres.log
> says: "user 'wagner' not found in password file". It seems that the
> username "test" does not make it to the backend, and my Windows username
> "wagner" is sent instead.
>
> Any hints?
>
> Thanks,
>
> Markus
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

-- 
Gary Stainburn
This email does not contain private or confidential material as it
may be snooped on by interested government parties for unknown
and undisclosed purposes - Regulation of Investigatory Powers Act, 2000     


RE: pg_hba.conf and password files

От
iafmgc@unileon.es
Дата:
Hello,
I would like to add another question.
In my pg_hba.conf file I have written the

local all crypt
host all 127.0.0.1 255.255.255.255 crypt
host invui x.x.x.x 255.255.255.0 crypt

It works fine through psql, web access through PHP and also ODBC access, but
i just have seen that in the /usr/local/pgsql/data/pg_hba.conf the passwords
are stored in plain text. I have seen through the documentation that if you
want to have those passords encrypted, then you have to use the postgreSQL
command pg_passwd and create a new file, but you have to add the users. What
I do not know yet, it is how the password politics works and which is the
way to add new users, through psql commands or bash commands??
Here it is what I want to do:
I have a C++ Builder application which will access the postgreSQL database
through an ODBC driver. I want to add the users from that application, using
SQL commands, if possible.
If anyone can give me any guidance, any information will be welcome,
because the documentations that I have read so far are a bit confusing.
Many thanks in advance
Miguel




----- Original Message -----
From: Gary Stainburn <gary.stainburn@ringways.co.uk>
To: Markus Wagner <wagner@imsd.uni-mainz.de>;
<pgsql-interfaces@postgresql.org>
Sent: Tuesday, August 07, 2001 12:51 PM
Subject: Re: pg_hba.conf and password files


> Hi Markus,
>
> I can't help you with the Access problem, but I'll just mention that
creating
> usr.txt line that won't work, as the password needs to be encrypted.  Use
the
> pg_passwd program to create the user details and it will encrypt it for
you.
>
> Gary
>
> On Tuesday 07 August 2001 10:26 am, Markus Wagner wrote:
> > Hi,
> >
> > I use a pg_hba.conf like this:
> >
> > local all trust
> > host all 127.0.0.1 255.255.255.255 trust
> > host all 134.93.64.0 255.255.255.0 password usr.txt
> >
> > In usr.txt I made one entry "test:test". When I connect with Access, the
> > DSN dialog appears, and I enter "test" and "test" in the corresponding
> > fields for username and password. The connect fails, and the
postgres.log
> > says: "user 'wagner' not found in password file". It seems that the
> > username "test" does not make it to the backend, and my Windows username
> > "wagner" is sent instead.
> >
> > Any hints?
> >
> > Thanks,
> >
> > Markus
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo@postgresql.org so that your
> > message can get through to the mailing list cleanly
>
> --
> Gary Stainburn
>
> This email does not contain private or confidential material as it
> may be snooped on by interested government parties for unknown
> and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>




RE: pg_hba.conf and password files

От
Miguel Gonzalez
Дата:
Hello,
I would like to add another question.
In my pg_hba.conf file I have written the

local all crypt
host all 127.0.0.1 255.255.255.255 crypt
host invui x.x.x.x 255.255.255.0 crypt

It works fine through psql, web access through PHP and also ODBC access, but
i just have seen that in the /usr/local/pgsql/data/pg_hba.conf the passwords
are stored in plain text. I have seen through the documentation that if you
want to have those passords encrypted, then you have to use the postgreSQL
command pg_passwd and create a new file, but you have to add the users. What
I do not know yet, it is how the password politics works and which is the
way to add new users, through psql commands or bash commands??
Here it is what I want to do:
I have a C++ Builder application which will access the postgreSQL database
through an ODBC driver. I want to add the users from that application, using
SQL commands, if possible.
If anyone can give me any guidance, any information will be welcome,
because the documentations that I have read so far are a bit confusing.
Many thanks in advance
Miguel




----- Original Message -----
From: Gary Stainburn <gary.stainburn@ringways.co.uk>
To: Markus Wagner <wagner@imsd.uni-mainz.de>;
<pgsql-interfaces@postgresql.org>
Sent: Tuesday, August 07, 2001 12:51 PM
Subject: Re: pg_hba.conf and password files


> Hi Markus,
>
> I can't help you with the Access problem, but I'll just mention that
creating
> usr.txt line that won't work, as the password needs to be encrypted.  Use
the
> pg_passwd program to create the user details and it will encrypt it for
you.
>
> Gary
>
> On Tuesday 07 August 2001 10:26 am, Markus Wagner wrote:
> > Hi,
> >
> > I use a pg_hba.conf like this:
> >
> > local all trust
> > host all 127.0.0.1 255.255.255.255 trust
> > host all 134.93.64.0 255.255.255.0 password usr.txt
> >
> > In usr.txt I made one entry "test:test". When I connect with Access, the
> > DSN dialog appears, and I enter "test" and "test" in the corresponding
> > fields for username and password. The connect fails, and the
postgres.log
> > says: "user 'wagner' not found in password file". It seems that the
> > username "test" does not make it to the backend, and my Windows username
> > "wagner" is sent instead.
> >
> > Any hints?
> >
> > Thanks,
> >
> > Markus
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo@postgresql.org so that your
> > message can get through to the mailing list cleanly
>
> --
> Gary Stainburn
>
> This email does not contain private or confidential material as it
> may be snooped on by interested government parties for unknown
> and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>