pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedHow to store a password encripted in a user defined table
16+ messages / 7 participants
[nested] [flat]
* How to store a password encripted in a user defined table
@ 2007-03-01 06:31 Eugenio Flores <eflores767003@yahoo.com.mx>
2007-03-01 08:21 ` Re: How to store a password encripted in a user defined table Andrej Ricnik-Bay <andrej.groups@gmail.com>
0 siblings, 1 reply; 16+ messages in thread
From: Eugenio Flores @ 2007-03-01 06:31 UTC (permalink / raw)
To: pgsql-sql
Hello, I wonder if somebody knows how to store passwords in a column that is part of a user defined table.
I've been searching and reading the documentation, but I can't find what I'm looking for. I just get password subjects related to client's connections to the database.
Thanks in advanced for any help you can provide.
___________________________________________________________
Do You Yahoo!?
La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al mes. http://net.yahoo.com.mx
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a user defined table
2007-03-01 06:31 How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
@ 2007-03-01 08:21 ` Andrej Ricnik-Bay <andrej.groups@gmail.com>
2007-03-01 11:39 ` Re: How to store a password encripted in a user defined table Shane Ambler <pgsql@Sheeky.Biz>
0 siblings, 1 reply; 16+ messages in thread
From: Andrej Ricnik-Bay @ 2007-03-01 08:21 UTC (permalink / raw)
To: Eugenio Flores <eflores767003@yahoo.com.mx>; pgsql-sql
On 3/1/07, Eugenio Flores <eflores767003@yahoo.com.mx> wrote:
> Hello, I wonder if somebody knows how to store passwords in a
> column that is part of a user defined table.
Assuming that your passwords are application specific use
a sha1 or md5 algorithm (depending on how sensitive your data is)
and store that in a varchar or char field. When the user authenticates
the password gets hashed in the app and compared against the
stored hash.
Cheers,
Andrej
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a user defined table
2007-03-01 06:31 How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
2007-03-01 08:21 ` Re: How to store a password encripted in a user defined table Andrej Ricnik-Bay <andrej.groups@gmail.com>
@ 2007-03-01 11:39 ` Shane Ambler <pgsql@Sheeky.Biz>
0 siblings, 0 replies; 16+ messages in thread
From: Shane Ambler @ 2007-03-01 11:39 UTC (permalink / raw)
To: Andrej Ricnik-Bay <andrej.groups@gmail.com>; +Cc: Eugenio Flores <eflores767003@yahoo.com.mx>; pgsql-sql
Andrej Ricnik-Bay wrote:
> On 3/1/07, Eugenio Flores <eflores767003@yahoo.com.mx> wrote:
>> Hello, I wonder if somebody knows how to store passwords in a
>> column that is part of a user defined table.
> Assuming that your passwords are application specific use
> a sha1 or md5 algorithm (depending on how sensitive your data is)
> and store that in a varchar or char field. When the user authenticates
> the password gets hashed in the app and compared against the
> stored hash.
>
If you want the server to take care of it look at pgcrypto - you will
find it in the contrib folder of the source distro.
This doesn't give you an encrypted data type (but you could set that up
if you wish) it will give you functions that you can use. Of course that
would mean they get sent through the client connection as clear text
unless you are using an SSL client connection.
--
Shane Ambler
pgSQL@Sheeky.Biz
Get Sheeky @ http://Sheeky.Biz
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a user defined table
@ 2007-03-01 11:06 Eugenio Flores <eflores767003@yahoo.com.mx>
2007-03-01 13:25 ` Re: How to store a password encripted in a user defined table John DeSoi <desoi@pgedit.com>
2007-03-01 13:42 ` Re: How to store a password encripted in a user definedtable Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 14:44 ` Re: How to store a password encripted in a user definedtable Bart Degryse <Bart.Degryse@indicator.be>
0 siblings, 3 replies; 16+ messages in thread
From: Eugenio Flores @ 2007-03-01 11:06 UTC (permalink / raw)
To: Andrej Ricnik-Bay <andrej.groups@gmail.com>; pgsql-sql
Thanks Andrej. But how can I use such algoritms in postgresql? arey they defined in a function that I can call?
Or, do I have to code one of those algorithm to use it in my application?
----- Mensaje original ----
De: Andrej Ricnik-Bay <andrej.groups@gmail.com>
Para: Eugenio Flores <eflores767003@yahoo.com.mx>; PostgreSQL <pgsql-sql@postgresql.org>
Enviado: jueves, 1 de marzo, 2007 0:21:06
Asunto: Re: [SQL] How to store a password encripted in a user defined table
On 3/1/07, Eugenio Flores <eflores767003@yahoo.com.mx> wrote:
> Hello, I wonder if somebody knows how to store passwords in a
> column that is part of a user defined table.
Assuming that your passwords are application specific use
a sha1 or md5 algorithm (depending on how sensitive your data is)
and store that in a varchar or char field. When the user authenticates
the password gets hashed in the app and compared against the
stored hash.
Cheers,
Andrej
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
___________________________________________________________
Do You Yahoo!?
La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al mes. http://net.yahoo.com.mx
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a user defined table
2007-03-01 11:06 Re: How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
@ 2007-03-01 13:25 ` John DeSoi <desoi@pgedit.com>
2007-03-01 14:08 ` Re: How to store a password encripted in a user defined table Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2 siblings, 1 reply; 16+ messages in thread
From: John DeSoi @ 2007-03-01 13:25 UTC (permalink / raw)
To: Eugenio Flores <eflores767003@yahoo.com.mx>; +Cc: Andrej Ricnik-Bay <andrej.groups@gmail.com>; pgsql-sql
MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to
hash passwords. For example:
select md5('this is my password');
md5
----------------------------------
210d53992dff432ec1b1a9698af9da16
(1 row)
On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote:
> Thanks Andrej. But how can I use such algoritms in postgresql? arey
> they defined in a function that I can call?
>
> Or, do I have to code one of those algorithm to use it in my
> application?
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a user defined table
2007-03-01 11:06 Re: How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
2007-03-01 13:25 ` Re: How to store a password encripted in a user defined table John DeSoi <desoi@pgedit.com>
@ 2007-03-01 14:08 ` Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
0 siblings, 0 replies; 16+ messages in thread
From: Ezequias Rodrigues da Rocha @ 2007-03-01 14:08 UTC (permalink / raw)
To: John DeSoi <desoi@pgedit.com>; +Cc: Eugenio Flores <eflores767003@yahoo.com.mx>; Andrej Ricnik-Bay <andrej.groups@gmail.com>; pgsql-sql
John,
That was what I was looking for for a long time.
Now I will change my teller password account to md5.
Could someone suggest me how to change all passwords (PLAIN) to md5 ?
My real best regards
Ezequias
2007/3/1, John DeSoi <desoi@pgedit.com>:
> MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to
> hash passwords. For example:
>
> select md5('this is my password');
>
> md5
> ----------------------------------
> 210d53992dff432ec1b1a9698af9da16
> (1 row)
>
>
>
> On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote:
>
> > Thanks Andrej. But how can I use such algoritms in postgresql? arey
> > they defined in a function that I can call?
> >
> > Or, do I have to code one of those algorithm to use it in my
> > application?
>
>
>
> John DeSoi, Ph.D.
> http://pgedit.com/
> Power Tools for PostgreSQL
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Atenciosamente (Sincerely)
Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a user definedtable
2007-03-01 11:06 Re: How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
@ 2007-03-01 13:42 ` Bart Degryse <Bart.Degryse@indicator.be>
2 siblings, 0 replies; 16+ messages in thread
From: Bart Degryse @ 2007-03-01 13:42 UTC (permalink / raw)
To: John DeSoi <desoi@pgedit.com>; pgsql-sql
Maybe a little example
- create a table with two columns: username and password (eg. tbl_users)
- in a secure environment (thus not over the internet) insert records into the table
INSERT INTO tbl_users(username, password) VALUES ('John', md5('johnspassword'))
- make a website with a login page (= a form with two fields: frm_username and frm_password)
- let a javascript md5 function hash the password before sending the form field values to the webserver
that way the password doensn't go over the internet in an unprotected way
- let your webserver (eg with php) compare the received password (= hashed) with the one in tbl_users
select count(*) from tbl_users where username = [value from frm_username] and password = [value from frm_password]
if the password is ok then count will be 1
- the user has been authenticated and can go on
now you can start a session in your website, etc etc
if count was 0 you should resent the login form with a notice "wrong password"
>>> John DeSoi <desoi@pgedit.com> 2007-03-01 14:25 >>>
MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to
hash passwords. For example:
select md5('this is my password');
md5
----------------------------------
210d53992dff432ec1b1a9698af9da16
(1 row)
On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote:
> Thanks Andrej. But how can I use such algoritms in postgresql? arey
> they defined in a function that I can call?
>
> Or, do I have to code one of those algorithm to use it in my
> application?
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a user definedtable
2007-03-01 11:06 Re: How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
@ 2007-03-01 14:44 ` Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 14:58 ` Re: How to store a password encripted in a user definedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2 siblings, 1 reply; 16+ messages in thread
From: Bart Degryse @ 2007-03-01 14:44 UTC (permalink / raw)
To: pgsql-sql
update yourtable set passwordfield = md5(passwordfield)
watch out: md5 is irreversable! you can't "un_md5"
>>> "Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com> 2007-03-01
15:08 >>>
John,
That was what I was looking for for a long time.
Now I will change my teller password account to md5.
Could someone suggest me how to change all passwords (PLAIN) to md5 ?
My real best regards
Ezequias
2007/3/1, John DeSoi <desoi@pgedit.com>:
> MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to
> hash passwords. For example:
>
> select md5('this is my password');
>
> md5
> ----------------------------------
> 210d53992dff432ec1b1a9698af9da16
> (1 row)
>
>
>
> On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote:
>
> > Thanks Andrej. But how can I use such algoritms in postgresql?
arey
> > they defined in a function that I can call?
> >
> > Or, do I have to code one of those algorithm to use it in my
> > application?
>
>
>
> John DeSoi, Ph.D.
> http://pgedit.com/
> Power Tools for PostgreSQL
>
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do
not
> match
>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Atenciosamente (Sincerely)
Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of
dictatorships
http://ezequiasrocha.blogspot.com/
---------------------------(end of
broadcast)---------------------------
TIP 6: explain analyze is your friend
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a user definedtable
2007-03-01 11:06 Re: How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
2007-03-01 14:44 ` Re: How to store a password encripted in a user definedtable Bart Degryse <Bart.Degryse@indicator.be>
@ 2007-03-01 14:58 ` Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-01 15:02 ` Re: How to store a password encripted in a user definedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-01 15:16 ` Re: How to store a password encripted in a userdefinedtable Bart Degryse <Bart.Degryse@indicator.be>
0 siblings, 2 replies; 16+ messages in thread
From: Ezequias Rodrigues da Rocha @ 2007-03-01 14:58 UTC (permalink / raw)
To: Bart Degryse <Bart.Degryse@indicator.be>; +Cc: pgsql-sql
I know it. Thank you so much.
Ezequias
Grettings from Brazil.
2007/3/1, Bart Degryse <Bart.Degryse@indicator.be>:
>
>
> update yourtable set passwordfield = md5(passwordfield)
>
> watch out: md5 is irreversable! you can't "un_md5"
>
>
> >>> "Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com> 2007-03-01
> 15:08 >>>
>
> John,
>
> That was what I was looking for for a long time.
>
> Now I will change my teller password account to md5.
>
> Could someone suggest me how to change all passwords (PLAIN) to md5 ?
>
> My real best regards
> Ezequias
>
> 2007/3/1, John DeSoi <desoi@pgedit.com>:
> > MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to
> > hash passwords. For example:
> >
> > select md5('this is my password');
> >
> > md5
> > ----------------------------------
> > 210d53992dff432ec1b1a9698af9da16
> > (1 row)
> >
> >
> >
> > On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote:
> >
> > > Thanks Andrej. But how can I use such algoritms in postgresql? arey
> > > they defined in a function that I can call?
> > >
> > > Or, do I have to code one of those algorithm to use it in my
> > > application?
> >
> >
> >
> > John DeSoi, Ph.D.
> > http://pgedit.com/
> > Power Tools for PostgreSQL
> >
> >
> > ---------------------------(end of
> broadcast)---------------------------
> > TIP 9: In versions below 8.0, the planner will ignore your desire to
> > choose an index scan if your joining column's datatypes do not
> > match
> >
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a user definedtable
2007-03-01 11:06 Re: How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
2007-03-01 14:44 ` Re: How to store a password encripted in a user definedtable Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 14:58 ` Re: How to store a password encripted in a user definedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
@ 2007-03-01 15:02 ` Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
1 sibling, 0 replies; 16+ messages in thread
From: Ezequias Rodrigues da Rocha @ 2007-03-01 15:02 UTC (permalink / raw)
To: Bart Degryse <Bart.Degryse@indicator.be>; +Cc: pgsql-sql
Just another thing.
Why md5 function return a different string from user role of postgresql ?
It allways put an md5 string concated with another sequence of string.
Why does it occurs ?
Ezequias
2007/3/1, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>:
> I know it. Thank you so much.
>
> Ezequias
> Grettings from Brazil.
>
> 2007/3/1, Bart Degryse <Bart.Degryse@indicator.be>:
> >
> >
> > update yourtable set passwordfield = md5(passwordfield)
> >
> > watch out: md5 is irreversable! you can't "un_md5"
> >
> >
> > >>> "Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com> 2007-03-01
> > 15:08 >>>
> >
> > John,
> >
> > That was what I was looking for for a long time.
> >
> > Now I will change my teller password account to md5.
> >
> > Could someone suggest me how to change all passwords (PLAIN) to md5 ?
> >
> > My real best regards
> > Ezequias
> >
> > 2007/3/1, John DeSoi <desoi@pgedit.com>:
> > > MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to
> > > hash passwords. For example:
> > >
> > > select md5('this is my password');
> > >
> > > md5
> > > ----------------------------------
> > > 210d53992dff432ec1b1a9698af9da16
> > > (1 row)
> > >
> > >
> > >
> > > On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote:
> > >
> > > > Thanks Andrej. But how can I use such algoritms in postgresql? arey
> > > > they defined in a function that I can call?
> > > >
> > > > Or, do I have to code one of those algorithm to use it in my
> > > > application?
> > >
> > >
> > >
> > > John DeSoi, Ph.D.
> > > http://pgedit.com/
> > > Power Tools for PostgreSQL
> > >
> > >
> > > ---------------------------(end of
> > broadcast)---------------------------
> > > TIP 9: In versions below 8.0, the planner will ignore your desire to
> > > choose an index scan if your joining column's datatypes do not
> > > match
> > >
>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Atenciosamente (Sincerely)
Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a userdefinedtable
2007-03-01 11:06 Re: How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
2007-03-01 14:44 ` Re: How to store a password encripted in a user definedtable Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 14:58 ` Re: How to store a password encripted in a user definedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
@ 2007-03-01 15:16 ` Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 16:53 ` Re: How to store a password encripted in a userdefinedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
1 sibling, 1 reply; 16+ messages in thread
From: Bart Degryse @ 2007-03-01 15:16 UTC (permalink / raw)
To: pgsql-sql; +Cc: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
It doesn't do that for me. I've tried it on three different databases
(of two different versions) as three different users and the result is
always the same (as it should be):
select USER, md5('password')
current_user md5
bigdbuser 5f4dcc3b5aa765d61d8327deb882cf99
current_user md5
bigdbsys 5f4dcc3b5aa765d61d8327deb882cf99
current_user md5
logstocksys 5f4dcc3b5aa765d61d8327deb882cf99
Show us some statements.
>>> "Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com> 2007-03-01
16:02 >>>
Just another thing.
Why md5 function return a different string from user role of postgresql
?
It allways put an md5 string concated with another sequence of string.
Why does it occurs ?
Ezequias
2007/3/1, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>:
> I know it. Thank you so much.
>
> Ezequias
> Grettings from Brazil.
>
> 2007/3/1, Bart Degryse <Bart.Degryse@indicator.be>:
> >
> >
> > update yourtable set passwordfield = md5(passwordfield)
> >
> > watch out: md5 is irreversable! you can't "un_md5"
> >
> >
> > >>> "Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com>
2007-03-01
> > 15:08 >>>
> >
> > John,
> >
> > That was what I was looking for for a long time.
> >
> > Now I will change my teller password account to md5.
> >
> > Could someone suggest me how to change all passwords (PLAIN) to md5
?
> >
> > My real best regards
> > Ezequias
> >
> > 2007/3/1, John DeSoi <desoi@pgedit.com>:
> > > MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses
to
> > > hash passwords. For example:
> > >
> > > select md5('this is my password');
> > >
> > > md5
> > > ----------------------------------
> > > 210d53992dff432ec1b1a9698af9da16
> > > (1 row)
> > >
> > >
> > >
> > > On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote:
> > >
> > > > Thanks Andrej. But how can I use such algoritms in postgresql?
arey
> > > > they defined in a function that I can call?
> > > >
> > > > Or, do I have to code one of those algorithm to use it in my
> > > > application?
> > >
> > >
> > >
> > > John DeSoi, Ph.D.
> > > http://pgedit.com/
> > > Power Tools for PostgreSQL
> > >
> > >
> > > ---------------------------(end of
> > broadcast)---------------------------
> > > TIP 9: In versions below 8.0, the planner will ignore your desire
to
> > > choose an index scan if your joining column's datatypes do
not
> > > match
> > >
>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Atenciosamente (Sincerely)
Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of
dictatorships
http://ezequiasrocha.blogspot.com/
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a userdefinedtable
2007-03-01 11:06 Re: How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
2007-03-01 14:44 ` Re: How to store a password encripted in a user definedtable Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 14:58 ` Re: How to store a password encripted in a user definedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-01 15:16 ` Re: How to store a password encripted in a userdefinedtable Bart Degryse <Bart.Degryse@indicator.be>
@ 2007-03-01 16:53 ` Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-01 17:14 ` Re: How to store a password encripted in a userdefinedtable Shane Ambler <pgsql@Sheeky.Biz>
2007-03-01 17:19 ` Re: How to store a password encripted in a userdefinedtable Adrian Klaver <aklaver@comcast.net>
0 siblings, 2 replies; 16+ messages in thread
From: Ezequias Rodrigues da Rocha @ 2007-03-01 16:53 UTC (permalink / raw)
To: Bart Degryse <Bart.Degryse@indicator.be>; +Cc: pgsql-sql
I am just passing the database owner password (postgresql
autentication) to the statement:
Select md5('the password I have in my mind') and compare with the
password pgAdmin3 shows me.
They are completely different.
Ezequias
2007/3/1, Bart Degryse <Bart.Degryse@indicator.be>:
>
>
> It doesn't do that for me. I've tried it on three different databases (of
> two different versions) as three different users and the result is always
> the same (as it should be):
>
> select USER, md5('password')
>
> current_user md5
> bigdbuser 5f4dcc3b5aa765d61d8327deb882cf99
>
> current_user md5
> bigdbsys 5f4dcc3b5aa765d61d8327deb882cf99
>
>
> current_user md5
> logstocksys 5f4dcc3b5aa765d61d8327deb882cf99
>
> Show us some statements.
>
>
> >>> "Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com> 2007-03-01
> 16:02 >>>
>
> Just another thing.
>
> Why md5 function return a different string from user role of postgresql ?
>
> It allways put an md5 string concated with another sequence of string.
>
> Why does it occurs ?
> Ezequias
>
> 2007/3/1, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>:
> > I know it. Thank you so much.
> >
> > Ezequias
> > Grettings from Brazil.
> >
> > 2007/3/1, Bart Degryse <Bart.Degryse@indicator.be>:
> > >
> > >
> > > update yourtable set passwordfield = md5(passwordfield)
> > >
> > > watch out: md5 is irreversable! you can't "un_md5"
> > >
> > >
> > > >>> "Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com> 2007-03-01
> > > 15:08 >>>
> > >
> > > John,
> > >
> > > That was what I was looking for for a long time.
> > >
> > > Now I will change my teller password account to md5.
> > >
> > > Could someone suggest me how to change all passwords (PLAIN) to md5 ?
> > >
> > > My real best regards
> > > Ezequias
> > >
> > > 2007/3/1, John DeSoi <desoi@pgedit.com>:
> > > > MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to
> > > > hash passwords. For example:
> > > >
> > > > select md5('this is my password');
> > > >
> > > > md5
> > > > ----------------------------------
> > > > 210d53992dff432ec1b1a9698af9da16
> > > > (1 row)
> > > >
> > > >
> > > >
> > > > On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote:
> > > >
> > > > > Thanks Andrej. But how can I use such algoritms in postgresql? arey
> > > > > they defined in a function that I can call?
> > > > >
> > > > > Or, do I have to code one of those algorithm to use it in my
> > > > > application?
> > > >
> > > >
> > > >
> > > > John DeSoi, Ph.D.
> > > > http://pgedit.com/
> > > > Power Tools for PostgreSQL
> > > >
> > > >
> > > > ---------------------------(end of
> > > broadcast)---------------------------
> > > > TIP 9: In versions below 8.0, the planner will ignore your desire to
> > > > choose an index scan if your joining column's datatypes do not
> > > > match
> > > >
> >
>
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Atenciosamente
> (Sincerely)
> Ezequias Rodrigues da Rocha
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> A pior das democracias ainda é melhor do que a melhor das ditaduras
> The worst of democracies is still better than the better of dictatorships
> http://ezequiasrocha.blogspot.com/
>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Atenciosamente (Sincerely)
Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a userdefinedtable
2007-03-01 11:06 Re: How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
2007-03-01 14:44 ` Re: How to store a password encripted in a user definedtable Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 14:58 ` Re: How to store a password encripted in a user definedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-01 15:16 ` Re: How to store a password encripted in a userdefinedtable Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 16:53 ` Re: How to store a password encripted in a userdefinedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
@ 2007-03-01 17:14 ` Shane Ambler <pgsql@Sheeky.Biz>
1 sibling, 0 replies; 16+ messages in thread
From: Shane Ambler @ 2007-03-01 17:14 UTC (permalink / raw)
To: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>; +Cc: Bart Degryse <Bart.Degryse@indicator.be>; pgsql-sql
Ezequias Rodrigues da Rocha wrote:
> I am just passing the database owner password (postgresql
> autentication) to the statement:
>
> Select md5('the password I have in my mind') and compare with the
> password pgAdmin3 shows me.
>
> They are completely different.
Try SELECT 'md5'||md5('the password I have in my mind'||'userlogin');
> Ezequias
>
> 2007/3/1, Bart Degryse <Bart.Degryse@indicator.be>:
>>
>>
>> It doesn't do that for me. I've tried it on three different databases (of
>> two different versions) as three different users and the result is always
>> the same (as it should be):
>>
>> select USER, md5('password')
>>
>> current_user md5
>> bigdbuser 5f4dcc3b5aa765d61d8327deb882cf99
>>
>> current_user md5
>> bigdbsys 5f4dcc3b5aa765d61d8327deb882cf99
>>
>>
>> current_user md5
>> logstocksys 5f4dcc3b5aa765d61d8327deb882cf99
>>
>> Show us some statements.
>>
>>
>> >>> "Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com> 2007-03-01
>> 16:02 >>>
>>
>> Just another thing.
>>
>> Why md5 function return a different string from user role of postgresql ?
>>
>> It allways put an md5 string concated with another sequence of string.
>>
>> Why does it occurs ?
>> Ezequias
>>
>> 2007/3/1, Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>:
>> > I know it. Thank you so much.
>> >
>> > Ezequias
>> > Grettings from Brazil.
>> >
>> > 2007/3/1, Bart Degryse <Bart.Degryse@indicator.be>:
>> > >
>> > >
>> > > update yourtable set passwordfield = md5(passwordfield)
>> > >
>> > > watch out: md5 is irreversable! you can't "un_md5"
>> > >
>> > >
>> > > >>> "Ezequias Rodrigues da Rocha" <ezequias.rocha@gmail.com>
>> 2007-03-01
>> > > 15:08 >>>
>> > >
>> > > John,
>> > >
>> > > That was what I was looking for for a long time.
>> > >
>> > > Now I will change my teller password account to md5.
>> > >
>> > > Could someone suggest me how to change all passwords (PLAIN) to md5 ?
>> > >
>> > > My real best regards
>> > > Ezequias
>> > >
>> > > 2007/3/1, John DeSoi <desoi@pgedit.com>:
>> > > > MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to
>> > > > hash passwords. For example:
>> > > >
>> > > > select md5('this is my password');
>> > > >
>> > > > md5
>> > > > ----------------------------------
>> > > > 210d53992dff432ec1b1a9698af9da16
>> > > > (1 row)
>> > > >
>> > > >
>> > > >
>> > > > On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote:
>> > > >
>> > > > > Thanks Andrej. But how can I use such algoritms in postgresql?
>> arey
>> > > > > they defined in a function that I can call?
>> > > > >
>> > > > > Or, do I have to code one of those algorithm to use it in my
>> > > > > application?
>> > > >
>> > > >
>> > > >
>> > > > John DeSoi, Ph.D.
>> > > > http://pgedit.com/
>> > > > Power Tools for PostgreSQL
>> > > >
>> > > >
>> > > > ---------------------------(end of
>> > > broadcast)---------------------------
>> > > > TIP 9: In versions below 8.0, the planner will ignore your
>> desire to
>> > > > choose an index scan if your joining column's datatypes
>> do not
>> > > > match
>> > > >
>> >
>>
>>
>> --
>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>> Atenciosamente
>> (Sincerely)
>> Ezequias Rodrigues da Rocha
>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
>> A pior das democracias ainda é melhor do que a melhor das ditaduras
>> The worst of democracies is still better than the better of dictatorships
>> http://ezequiasrocha.blogspot.com/
>>
>
>
--
Shane Ambler
pgSQL@Sheeky.Biz
Get Sheeky @ http://Sheeky.Biz
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a userdefinedtable
2007-03-01 11:06 Re: How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
2007-03-01 14:44 ` Re: How to store a password encripted in a user definedtable Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 14:58 ` Re: How to store a password encripted in a user definedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-01 15:16 ` Re: How to store a password encripted in a userdefinedtable Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 16:53 ` Re: How to store a password encripted in a userdefinedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
@ 2007-03-01 17:19 ` Adrian Klaver <aklaver@comcast.net>
2007-03-01 18:02 ` Re: How to store a password encripted in a userdefinedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
1 sibling, 1 reply; 16+ messages in thread
From: Adrian Klaver @ 2007-03-01 17:19 UTC (permalink / raw)
To: pgsql-sql; +Cc: Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>; Bart Degryse <Bart.Degryse@indicator.be>
On Thursday 01 March 2007 8:53 am, Ezequias Rodrigues da Rocha wrote:
> I am just passing the database owner password (postgresql
> autentication) to the statement:
>
> Select md5('the password I have in my mind') and compare with the
> password pgAdmin3 shows me.
>
> They are completely different.
>
> Ezequias
>
<Snip>
Try select md5('password'||'user')
The generated hash is a combination of the password and the user name.
--
Adrian Klaver
aklaver@comcast.net
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a userdefinedtable
2007-03-01 11:06 Re: How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
2007-03-01 14:44 ` Re: How to store a password encripted in a user definedtable Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 14:58 ` Re: How to store a password encripted in a user definedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-01 15:16 ` Re: How to store a password encripted in a userdefinedtable Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 16:53 ` Re: How to store a password encripted in a userdefinedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-01 17:19 ` Re: How to store a password encripted in a userdefinedtable Adrian Klaver <aklaver@comcast.net>
@ 2007-03-01 18:02 ` Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
0 siblings, 0 replies; 16+ messages in thread
From: Ezequias Rodrigues da Rocha @ 2007-03-01 18:02 UTC (permalink / raw)
To: Adrian Klaver <aklaver@comcast.net>; +Cc: pgsql-sql@postgresql.org, "Bart Degryse" <Bart.Degryse@indicator.be>
Perfect ! That's it.
Another information I doesn't have. Great to be part of this list.
Thank you
Adrian
2007/3/1, Adrian Klaver <aklaver@comcast.net>:
> On Thursday 01 March 2007 8:53 am, Ezequias Rodrigues da Rocha wrote:
> > I am just passing the database owner password (postgresql
> > autentication) to the statement:
> >
> > Select md5('the password I have in my mind') and compare with the
> > password pgAdmin3 shows me.
> >
> > They are completely different.
> >
> > Ezequias
> >
> <Snip>
> Try select md5('password'||'user')
> The generated hash is a combination of the password and the user name.
> --
> Adrian Klaver
> aklaver@comcast.net
>
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Atenciosamente (Sincerely)
Ezequias Rodrigues da Rocha
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
A pior das democracias ainda é melhor do que a melhor das ditaduras
The worst of democracies is still better than the better of dictatorships
http://ezequiasrocha.blogspot.com/
^ permalink raw reply [nested|flat] 16+ messages in thread
* Re: How to store a password encripted in a user defined table
@ 2007-03-01 19:49 Eugenio Flores <eflores767003@yahoo.com.mx>
0 siblings, 0 replies; 16+ messages in thread
From: Eugenio Flores @ 2007-03-01 19:49 UTC (permalink / raw)
To: John DeSoi <desoi@pgedit.com>; +Cc: Andrej Ricnik-Bay <andrej.groups@gmail.com>; pgsql-sql
Thanks for your anwers. They have been very useful.
Thanks again.
----- Mensaje original ----
De: John DeSoi <desoi@pgedit.com>
Para: Eugenio Flores <eflores767003@yahoo.com.mx>
CC: Andrej Ricnik-Bay <andrej.groups@gmail.com>; PostgreSQL <pgsql-sql@postgresql.org>
Enviado: jueves, 1 de marzo, 2007 5:25:28
Asunto: Re: [SQL] How to store a password encripted in a user defined table
MD5 is built-in to PostgreSQL. It is what PostgreSQL itself uses to
hash passwords. For example:
select md5('this is my password');
md5
----------------------------------
210d53992dff432ec1b1a9698af9da16
(1 row)
On Mar 1, 2007, at 6:06 AM, Eugenio Flores wrote:
> Thanks Andrej. But how can I use such algoritms in postgresql? arey
> they defined in a function that I can call?
>
> Or, do I have to code one of those algorithm to use it in my
> application?
John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match
___________________________________________________________
Do You Yahoo!?
La mejor conexión a Internet y <b >2GB</b> extra a tu correo por $100 al mes. http://net.yahoo.com.mx
^ permalink raw reply [nested|flat] 16+ messages in thread
end of thread, other threads:[~2007-03-01 19:49 UTC | newest]
Thread overview: 16+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2007-03-01 06:31 How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
2007-03-01 08:21 ` Andrej Ricnik-Bay <andrej.groups@gmail.com>
2007-03-01 11:39 ` Shane Ambler <pgsql@Sheeky.Biz>
2007-03-01 11:06 Re: How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
2007-03-01 13:25 ` John DeSoi <desoi@pgedit.com>
2007-03-01 14:08 ` Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-01 13:42 ` Re: How to store a password encripted in a user definedtable Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 14:44 ` Re: How to store a password encripted in a user definedtable Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 14:58 ` Re: How to store a password encripted in a user definedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-01 15:02 ` Re: How to store a password encripted in a user definedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-01 15:16 ` Re: How to store a password encripted in a userdefinedtable Bart Degryse <Bart.Degryse@indicator.be>
2007-03-01 16:53 ` Re: How to store a password encripted in a userdefinedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-01 17:14 ` Re: How to store a password encripted in a userdefinedtable Shane Ambler <pgsql@Sheeky.Biz>
2007-03-01 17:19 ` Re: How to store a password encripted in a userdefinedtable Adrian Klaver <aklaver@comcast.net>
2007-03-01 18:02 ` Re: How to store a password encripted in a userdefinedtable Ezequias Rodrigues da Rocha <ezequias.rocha@gmail.com>
2007-03-01 19:49 Re: How to store a password encripted in a user defined table Eugenio Flores <eflores767003@yahoo.com.mx>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox