tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* perl pwpolicy problem
@ 2003-05-14 14:07 neil.hoare
  0 siblings, 0 replies; only message in thread
From: neil.hoare @ 2003-05-14 14:07 UTC (permalink / raw)


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;
}




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-14 14:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-14 14:07 perl pwpolicy problem neil.hoare

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox