Authentification using Linux user/password

I am writing an in-house web application with RAILS and I want users to
log-in to the application before they can do anything. Since all users
already have an accont on the linux machine where the web application
will be running, I’d like to use these accounts for authentification.
Is there a way in Ruby/RAILS to authenticate a user/password pair
against the accounts defined on the linux box transparently?

PAM/Ruby maybe (PAM/Ruby) ?

Fred