From: Sean Middleditch Date: 2001-11-27T23:41:08+09:00 Subject: [ruby-talk:26662] Re: Password encryption (UNIX) On Tue, Nov 27, 2001 at 02:27:57PM +0900, HarryO wrote: > I want to use the standard UNIX login/password mechanism for > authentication of a user. Is there any support in the libraries to > allow me to encrypt a password, so I can compare it with the one > stored for a given login name? I'm not sure if you meant that you specifically want only the /etc/passwd mechanism to work. If you meant you want to login based on UNIX accounts, use PAM. Checking /etc/passwd won't do any good on a large number of machine. Like my LDAP based ones. You need PAM to authenticate these. > > If not, and there's anyone here who knows how to do it using the > crypt(3) library routine (I don't understand what to put in for the > "salt" parameter), can they contact me? > > I'll write a small ruby class to do this, if I have to.