perl pwpolicy problem

From: neil.hoare@alcatel.co.uk
Date: Wed May 14 2003 - 10:07:37 EDT


Hello Managers,

I've written perl pwpolicy script, as below, which checks simply that an
entered password contains a mix of alphanumeric characters.

If I run the script in isolation, and then check the result using "echo
$?", then i see exit codes 0 & 1 as I would expect, but when called via the
password command i just get an illegal password error, for anything entered
at all.

Other details are 4.0f pk7, Enhanced security.

Any ideas?

Cheers

Neil

#!/usr/bin/perl

$_=<STDIN>;

chomp;

if (/^[A-Za-z]+[0-9]+[A-Za-z0-9]*$/ ||
        /^[0-9]+[A-Za-z]+[A-Za-z0-9]*$/)
 {
        exit 0;
} else {
        exit 1;
}



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:49:18 EDT