473,399 Members | 4,177 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

psql and md5

Is there a way to provide a md5 password directly to psql? I'm aware of
pgpass but I would like to store a md5 password in some other location
and then use it to execute commands with psql.

Thanks,

John DeSoi, Ph.D.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #1
6 6352
Hi

You can always generate the md5 password using perl/php and store the password
in database. I believe the next version of pgsql will have an internal md5
function.

Simon

On Monday 02 August 2004 15:43, John DeSoi wrote:
Is there a way to provide a md5 password directly to psql? I'm aware of
pgpass but I would like to store a md5 password in some other location
and then use it to execute commands with psql.

Thanks,

John DeSoi, Ph.D.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org


--
Simon Windsor
Email: si***********@cornfield.org.uk
Tel: 01454 617689
Mob: 07960 321599

---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #2
В Пнд, 02.08.2004, в 19:21, Simon Windsor пишет:
Hi

You can always generate the md5 password using perl/php and store the password
in database. I believe the next version of pgsql will have an internal md5
function.
template1=# select version();

version
---------------------------------------------------------------------------------------------------------------------------------
PostgreSQL 7.4.2 on i386-redhat-linux-gnu, compiled by GCC
i386-redhat-linux-gcc (GCC) 3.3.3 20040216 (Red Hat Linux 3.3.3-2.1)
(1 запись)

template1=# select md5('foo');
md5
----------------------------------
acbd18db4cc2f85cedef654fccc4a4d8
(1 запись)


Simon

On Monday 02 August 2004 15:43, John DeSoi wrote:
Is there a way to provide a md5 password directly to psql? I'm aware of
pgpass but I would like to store a md5 password in some other location
and then use it to execute commands with psql.

Thanks,

John DeSoi, Ph.D.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

--
Markus Bertheau <tw*****@bluetwanger.de>
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #3

I guess :

Bienvenue dans psql 7.4.2, l'interface interactive de PostgreSQL.

select md5('abcdef');
md5
----------------------------------
e80b5017098950fc58aad83c8c14978e
(1 ligne)

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)

Nov 23 '05 #4

On Aug 2, 2004, at 1:21 PM, Simon Windsor wrote:
You can always generate the md5 password using perl/php and store the
password
in database. I believe the next version of pgsql will have an internal
md5
function.


psql is a client application. It supports md5 as an authentication
method to the server, but the password provided to psql must be plain
text as far as I can tell. My goal here is to store some psql
connection information in something like the pgpass file, but I don't
want to leave passwords without some kind of protection.

Best,
John DeSoi, Ph.D.
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #5
Hi,

this would not be very useful. The database you are talking to needs to know
if you know the password and not only the md5-password. If you only need to
tell psql the md5-password, you don't need to know the real one.
Tommi
Am Montag, 2. August 2004 16:43 schrieb John DeSoi:
Is there a way to provide a md5 password directly to psql? I'm aware of
pgpass but I would like to store a md5 password in some other location
and then use it to execute commands with psql.

Thanks,

John DeSoi, Ph.D.
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postgresql.org

Nov 23 '05 #6

On Aug 5, 2004, at 7:29 AM, Tommi Maekitalo wrote:
this would not be very useful. The database you are talking to needs
to know
if you know the password and not only the md5-password. If you only
need to
tell psql the md5-password, you don't need to know the real one.


Yes, you are right. I did not think the issues through clearly enough
before posting my question.

I have resolved things by using reversible encryption to store the
passwords (blowfish).

Best,

John DeSoi, Ph.D.
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
by: Daniel Schuchardt | last post by:
Hi @ all, i'm sure there was a psql-function to transfere my Blob-Data to the server but I can't remember. I have a script like this : UPDATE xy SET z = lo_import('localpath_and_file'); ...
4
by: Phil Campaigne | last post by:
Hi All, I just installed postgresql 7.3.4 as an upgrade to 7.3.2 and all went well untill I tried to log into a database that I successfully created. Here are the steps in question: bash-2.05b$...
7
by: Willem Herremans | last post by:
I am developing a client application for postgreSQL in Tcl/Tk (see http://gborg.postgresql.org/project/pfm ). It mainly uses PgTcl or pgintcl. I don't have any problems with those, but I am also...
4
by: Brendan Jurd | last post by:
Hello all, I just wanted to pass on some information about compatibility between the psql client and the postgres server. On a particular network, my workstation and the server are both debian...
15
by: Dino Vliet | last post by:
Hi folks, probably this is a question you've heard so many times but I wasn't able to find a solution to it. I'm using a shell script to create a textfile for me. It looks like...
1
by: Josu Maldonado | last post by:
Hello List, I'm having this issue with beta 8.0 C:\pgsql\bin>pg_dump -U postgres farmacia > xfar.sql Password: C:\pgsql\bin>psql -U postgres farmacia2 < xfar.sql Password: psql: FATAL: ...
2
by: Russ Brown | last post by:
Hello, Today I tried connecting to my database locally via psql. I got the usual welcome & basic help messages, but it never got to the prompt: it just hung. So I checked top and the psql...
33
by: John Sidney-Woollett | last post by:
With the advent of postgres v8, would it be possible to change the default behaviour of psql from AUTOCOMMIT=ON to AUTOCOMMIT=OFF ? Although this might break backward compatibility, it might be...
2
by: Patrick Hatcher | last post by:
Just installed and started Pg8.0 beta 2 When I tried to connect via psql, I received an error message: $ psql -Upostgres template1 psql: relocation error: psql: undefined symbol:...
3
by: oksofar | last post by:
Hello - I'm running PG 8.1 on Windows XP. I've installed the server to run as a service. The psql command fails to connect to the server, although I can connect with other clients. When I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.