W. Chris Shank on 27 Apr 2007 18:17:15 -0000

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

Re: [PLUG] md5 problem

I actually got it working.

here is what i was doing. I have a web app that has an md5 hashed password in a config file and another web app that will use a std .htaccess file. i want to keep the username and passwords in sync when setting up these 2 web apps. i am writing a script to automaticaly setup the 2 apps. i was having a problem getting the passwords hashed correctly for each location.

I was able to fix the php issue - solution shown on previous post. now it looks like .htpasswd doesn't like the -b switch - but i'm still testing.

----- Original Message -----
From: Stephen Gran <steve@lobefin.net>
To: Philadelphia Linux User's Group Discussion List <plug@lists.phillylinux.org>
Sent: Friday, April 27, 2007 11:33:55 AM GMT-0500
Subject: Re: [PLUG] md5 problem

On Thu, Apr 26, 2007 at 11:08:48PM -0400, W. Chris Shank said:
> I have a need to create an md5 password hash that matches the hash
> created by php md5() function, but I need to do it from the command
> line so I can script it. I tried htpasswd -m but the resultant hash is
> totally different.
> Actually, I take that back, I don't need to match the hash really - I
> need to be able to make the php md5() hash on the fly from a variable.
> The other place I need to passwd can use it's own version of the hash
> - so long as the real passwords are the same. If I were to call php
> directly, how could I get a variable into the script? Any clues? Any
> other md5 hashing creation tools? I looked at md5sum but it really
> wants to hash a whole file.

Can you be more clear on what you're doing, so I can try to understand
the problem a little better?  I.e., where are the passwords coming from,
and in what form (clear text, already hashed, etc) and what are you
comparing them to (database record of hashed password, htpasswd file,
|  Stephen Gran                  | Experience is what you get when you     |
|  steve@lobefin.net             | were expecting something else.          |
|  http://www.lobefin.net/~steve |                                         |

W. Chris Shank
ACE Technology Group, LLC
(610) 640-4223

Security Note: To protect against computer viruses, 
e-mail programs may prevent sending or receiving 
certain types of file attachments. Check your e-mail 
security settings to determine how attachments are 
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug