Rpam


PAM (Pluggable Authentication Modules) integration with ruby.

Install



Source


http://rubyforge.org/projects/rpam/

SVN source



svn checkout http://rpam.rubyforge.org/svn/ Rpam-1.0-0


GIT source



git clone git@github.com:andrem/rpam.git Rpam-1.0-0


Install from source



cd Rpam-1.0-0/


ruby extconf.rb


make


make install


Configure PAM



cp /etc/pam.d/login /etc/pam.d/rpam


Code example



#!/usr/bin/ruby

require 'rpam'
include Rpam

if authpam("username","password") == true
  puts "SUCCESS"
else
  puts "FAILED"
end


Case



The WebYast of Open Suse use this!