I know this has been posted in the past, but I can't figure it out for the
life of me. Here's what I'm trying to do:
Take a username and password from user entry (CGI script).
Check it against the master password database.
I have tried the command-line solution given on the qmail.org homepage,
but I can't make it work. Here's been my try so far :
I have printed the string "user\000password\000Y123456\000" into a file
using a perl script, so it turns the \000 into the null character
checkpassword is looking for (I believe. I then pass the file to
checkpassword like so :
/bin/checkpassword /bin/id 3<test.file
Just like it says on the page. This results in nothing happening, hence I
take it the password is not being accepted even though it is correct. I
am running on FreeBSD 3.1, and checkpassword works with the qmail install
I have, so I know my version works. But I need to be able to use it from
the command line, or at least something other than qmail-popup. It is the
most secure way of checking a password by a non-root application I can
think of, and that is allowed by my boss. can someone help me out please?
Thanks.