[op5-users] apr_md5_validate

Andreas Ericsson ae at op5.se
Wed Nov 25 16:26:11 CET 2009


On 11/25/2009 03:44 PM, Patrik Båt wrote:
> Hello, experience some problem with the apr_md5_validate.
> 
> First, it cant validate :
> 
> ./apr_md5_validate test $apr1$UXwjq\/..$Hv\/u1Q8l.cvX4ludOxp5p0
> Password is not encrypted using apache's md5 hash algorithm
> 

When you're passing the password as an argument on the command-line,
the shell thinks everything following a dollar-sign is a variable.
Put the second argument in single quotes and it'll work just fine.

With the password above, I get "password mismatch" when I add the
single quotes. Without the single-quotes, I get the error you're
seeing.

This command, with single quotes, should result in "password matches":
./apr_md5_validate 'superduper' '$apr1$cAki6/..$Ojz5jAwkPyPhuXKghsS8y0'

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.


More information about the op5-users mailing list