pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedpassword encryption
6+ messages / 6 participants
[nested] [flat]
* password encryption
@ 2000-07-21 16:08 Silesky Marketing Inc, Support <support@silesky.com>
2000-07-21 17:30 ` Re: [SQL] password encryption Roderick A. Anderson <raanders@altoplanos.net>
0 siblings, 1 reply; 6+ messages in thread
From: Silesky Marketing Inc, Support @ 2000-07-21 16:08 UTC (permalink / raw)
To: pgsql <pgsql-sql@postgresql.org>; pgsql-general
Hello,
I want to encrypt passwords with Postgresql the way mySQL does it with :
UPDATE user SET Password=PASSWORD('new_password') WHERE user='root';
How can I do that ?
Thanks a lot,
Laurent
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: [SQL] password encryption
2000-07-21 16:08 password encryption Silesky Marketing Inc, Support <support@silesky.com>
@ 2000-07-21 17:30 ` Roderick A. Anderson <raanders@altoplanos.net>
2000-07-24 22:37 ` Re: password encryption Aaron Sethman <androsyn@ratbox.org>
0 siblings, 1 reply; 6+ messages in thread
From: Roderick A. Anderson @ 2000-07-21 17:30 UTC (permalink / raw)
To: Silesky Marketing Inc, Support <support@silesky.com>; +Cc: pgsql <pgsql-sql@postgresql.org>; pgsql-general
On Fri, 21 Jul 2000, Silesky Marketing Inc, Support wrote:
> Hello,
>
> I want to encrypt passwords with Postgresql the way mySQL does it with :
>
> UPDATE user SET Password=PASSWORD('new_password') WHERE user='root';
Check out the ALTER command.
ALTER USER username
[ WITH PASSWORD 'password' ]
[ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]
[ VALID UNTIL 'abstime' ]
Rod
--
Roderick A. Anderson
raanders@altoplanos.net Altoplanos Information Systems, Inc.
Voice: 208.765.6149 212 S. 11th Street, Suite 5
FAX: 208.664.5299 Coeur d'Alene, ID 83814
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: password encryption
2000-07-21 16:08 password encryption Silesky Marketing Inc, Support <support@silesky.com>
2000-07-21 17:30 ` Re: [SQL] password encryption Roderick A. Anderson <raanders@altoplanos.net>
@ 2000-07-24 22:37 ` Aaron Sethman <androsyn@ratbox.org>
0 siblings, 0 replies; 6+ messages in thread
From: Aaron Sethman @ 2000-07-24 22:37 UTC (permalink / raw)
To: Roderick A. Anderson <raanders@altoplanos.net>; +Cc: Silesky Marketing Inc, Support <support@silesky.com>; pgsql <pgsql-sql@postgresql.org>; pgsql-general
I think what he was looking for was more along the lines of a generic sql
function that hashes a string, and not to update the system tables.
I actually wrote a replacement for the mysql PASSWORD() function that is
actually compatible with the hashing that mysql uses. If you would like a
copy of this function just let me know so I can extract it out of the a
bunch of other functions.
Aaron
On Fri, 21 Jul 2000, Roderick A. Anderson wrote:
> On Fri, 21 Jul 2000, Silesky Marketing Inc, Support wrote:
>
> > Hello,
> >
> > I want to encrypt passwords with Postgresql the way mySQL does it with :
> >
> > UPDATE user SET Password=PASSWORD('new_password') WHERE user='root';
>
> Check out the ALTER command.
>
> ALTER USER username
> [ WITH PASSWORD 'password' ]
> [ CREATEDB | NOCREATEDB ] [ CREATEUSER | NOCREATEUSER ]
> [ VALID UNTIL 'abstime' ]
>
>
> Rod
> --
> Roderick A. Anderson
> raanders@altoplanos.net Altoplanos Information Systems, Inc.
> Voice: 208.765.6149 212 S. 11th Street, Suite 5
> FAX: 208.664.5299 Coeur d'Alene, ID 83814
>
>
>
^ permalink raw reply [nested|flat] 6+ messages in thread
* Password encryption
@ 2018-04-16 00:22 Azimuddin Mohammed <azimeiu@gmail.com>
2018-04-16 00:37 ` Re: Password encryption Adrian Klaver <adrian.klaver@aklaver.com>
2018-04-16 01:16 ` Re: Password encryption Ron <ronljohnsonjr@gmail.com>
0 siblings, 2 replies; 6+ messages in thread
From: Azimuddin Mohammed @ 2018-04-16 00:22 UTC (permalink / raw)
To: pgsql-admin <pgsql-admin@postgresql.org>; pgsql-general
Hello,
Is there a way I can encrypt the default password column of db user
password. I know by default the password is encrypted as md5, can we
encrypt that of shadow column for password?
Thanks in advance
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Password encryption
2018-04-16 00:22 Password encryption Azimuddin Mohammed <azimeiu@gmail.com>
@ 2018-04-16 00:37 ` Adrian Klaver <adrian.klaver@aklaver.com>
1 sibling, 0 replies; 6+ messages in thread
From: Adrian Klaver @ 2018-04-16 00:37 UTC (permalink / raw)
To: Azimuddin Mohammed <azimeiu@gmail.com>; pgsql-admin <pgsql-admin@postgresql.org>; pgsql-general
On 04/15/2018 05:22 PM, Azimuddin Mohammed wrote:
> Hello,
> Is there a way I can encrypt the default password column of db user
> password. I know by default the password is encrypted as md5, can we
> encrypt that of shadow column for password?
Are you talking about this view?:
https://www.postgresql.org/docs/10/static/view-pg-shadow.html
If so that is only readable by superusers:
production=# \c - aklaver
You are now connected to database "production" as user "aklaver".
production=> select * from pg_shadow ;
ERROR: permission denied for relation pg_shadow
production=> \c - postgres
You are now connected to database "production" as user "postgres".
production=# select * from pg_shadow ;
usename | usesysid | usecreatedb | usesuper | userepl |
usebypassrls | passwd | valuntil | useconfig
...
Assuming someone is in your database as a superuser, access to the
password field in pg_shadow is pretty much moot.
>
> Thanks in advance
--
Adrian Klaver
adrian.klaver@aklaver.com
^ permalink raw reply [nested|flat] 6+ messages in thread
* Re: Password encryption
2018-04-16 00:22 Password encryption Azimuddin Mohammed <azimeiu@gmail.com>
@ 2018-04-16 01:16 ` Ron <ronljohnsonjr@gmail.com>
1 sibling, 0 replies; 6+ messages in thread
From: Ron @ 2018-04-16 01:16 UTC (permalink / raw)
To: pgsql-admin@lists.postgresql.org
On 04/15/2018 07:22 PM, Azimuddin Mohammed wrote:
> Hello,
> Is there a way I can encrypt the default password column of db user
> password. I know by default the password is encrypted as md5, can we
> encrypt that of shadow column for password?
MD5 is a *one-way hash*, not an encryption scheme. Thus, the password
cannot be reverse-computed from the MD5 hash value. So, you're (kinda)
safe, although an attacker could determine the password through brute-force
calculation of hashes.
--
Angular momentum makes the world go 'round.
^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2018-04-16 01:16 UTC | newest]
Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2000-07-21 16:08 password encryption Silesky Marketing Inc, Support <support@silesky.com>
2000-07-21 17:30 ` Roderick A. Anderson <raanders@altoplanos.net>
2000-07-24 22:37 ` Aaron Sethman <androsyn@ratbox.org>
2018-04-16 00:22 Password encryption Azimuddin Mohammed <azimeiu@gmail.com>
2018-04-16 00:37 ` Re: Password encryption Adrian Klaver <adrian.klaver@aklaver.com>
2018-04-16 01:16 ` Re: Password encryption Ron <ronljohnsonjr@gmail.com>
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