Ruby on linux: How to check (username,password)?


#1

Hi to everyone,

I’m writing some code to check that a password is the correct one for a
given user (in which case I need to change it to a supplied one).

As I’ve stated in the subject, I’m on a linux box.

Digging both in the core/standard library led me nowhere, while google
found a library named “ruby-pam”.

I’ve downloaded and installed the library (no gem), and found that it
comes with no other documentation than the test scripts accompaining the
sources (c code).

From the test scripts, I understood that one has to provide a
“conversation function” required to talk to PAM modules.

Now, I would like to know:

  1. Are there any users/examples/documentation of the abovementioned
    library?
  2. Are there simpler alternatives?

Thanks in advance for your help.

Regards,
Carmine