in reply to user authentication using unix password file

Assuming your machine is using crypt: yes, it's easy though on most systems you'd need /etc/shadow, which usually is readable only by root.

Anyway, the code:

#!/usr/bin/perl -w use strict; my $crypted_passwd = 'SqL9sEYFbjX0U'; my $clear_passwd = 'blah'; my $seed = substr( $crypted_passwd, 0, 2 ); print "It's correct\n" if crypt( $clear_passwd, $seed ) eq $crypted_pa +sswd;

Update: Oops, misunderstood your question. Seems like serious caffeine shortage.

The proper answer would probably be: use Authen::PAM ;-)

-mk