Creating md5 passwords in PHP for the PostgreSQL pg_shadow table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Hi All,

I want to be able to allow non-superusers the ability to create other PostgreSQL users in limited circumstances. My plan was to create a dummy table with rules that actually made changes to the pg_shadow table.

Therefore I need to be able to create password entries in the pg_shadow table. From browsing the code and the mailing lists I'm pretty certain I need to do the following in PHP to create a MD5 password for PostgreSQL:

$passwd = "md5" . md5( md5( $password . $username ) . $salt );

Has anybody done this before? Is this the right way to get the md5?... and if so... how do I get PostgreSQL to give me the salt?

Thanks in advance for any assistance!

Cheers

Matthew.

--
Matthew Horoschun
Network Administrator
CanPrint Communications Pty. Ltd.

Mobile:		0417 282 378
Direct:		(02) 6295 4544
Telephone:	(02) 6295 4422
Facsimile: 	(02) 6295 4473



[Index of Archives]     [Postgresql General]     [Postgresql Admin]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Yosemite Backpacking]     [Postgresql Jobs]

  Powered by Linux