rvosa has asked for the wisdom of the Perl Monks concerning the following question:
Dear monks,
I am looking for a (moderately) portable way of running system user authentication. I thought I understood from the perldocs that the following would work in an ideal world:
Thank you!
I am looking for a (moderately) portable way of running system user authentication. I thought I understood from the perldocs that the following would work in an ideal world:
but it neither does on OSX (10.4, intel) nor on x86 red hat (not sure if these are "ideal world") so I guess I misunderstood. What am I missing?use strict; use warnings; my @pwstruct = getpwnam('me'); my $plain = '****'; my $encrypted = $pwstruct[1]; if ( crypt( $plain, $encrypted ) eq $encrypted ) { print "ok"; }
Thank you!
Back to
Seekers of Perl Wisdom