Stephen Gran on 27 Apr 2007 15:34:03 -0000


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

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,
etc).
-- 
 --------------------------------------------------------------------------
|  Stephen Gran                  | Experience is what you get when you     |
|  steve@lobefin.net             | were expecting something else.          |
|  http://www.lobefin.net/~steve |                                         |
 --------------------------------------------------------------------------

Attachment: signature.asc
Description: Digital signature

___________________________________________________________________________
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