Zhao Yi wrote:
> Can ruby check user name and password the same way as Linux OS? I use
> "ypcat passwd" to list all users and its encrypted password. I want
> users to input their user name and password to ruby and let ruby the
> check its validation.
> 
> thanks.

If your system uses PAM, like most modern linux distros, you might want 
to look at Ruby/PAM[1]

I haven't tried it but a quick look through the examples seems like it 
could work for you.

[1]http://ruby-pam.sourceforge.net/pam-ruby.html

HTH

Matt