Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Crypt not working as I hoped

Status
Not open for further replies.

jayknite

Programmer
Feb 8, 2005
1
US
Because of some licensing issues my company has decided to use pgsql for authenticating our users. I am using PostgreSQL 7.3.2-3 with postgresql-contrib-7.3.2-3 and mod_auth_pgsql-0.9.12-14. We already have a database of usernames and passwords, but the passwords are in DES STD (2 character salt). Whenever I use gen_salt('des') with crypt in postgresql it creates a DES EXT (9 character salt) crypt. If I just copy the username and password manually into the database and try to authenticate against it using CRYPT in the htaccess file the authentication fails.

I know that mod_auth is working because I created a plain text password and used that, authenticated fine. It appears that the CRYPT in mod_auth_pgsql is DES EXT as well. I can probably get around that, but I'm going to need to add new users and passwords to the database, is there any way to force DES STD in pgsql when inserting a string with crypt?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top