[Cedarvalley] Perl Impossibility?
Aaron Thompson
thompson at cns.uni.edu
Tue Mar 16 09:36:44 CST 2004
Steve,
I don't know if this will help - its a little UNIX-centric. Its
from a password updating script I wrote a while back.
--<snip>--
print "enter your CNS Password: ";
system("stty -echo");
chomp($passwd = <>);
system("stty echo");
print "\nVerifying user ... \n";
ref($pamh = new Authen::PAM($pamsvc, $uname, \&MyConvFunc)) ||
die "Error code $pamh during PAM init!";
$res = $pamh->pam_set_item(PAM_TTY(), $tty_name);
$res = $pamh->pam_authenticate;
while(!($res == PAM_SUCCESS()) ){
if($tryCount < $MAXTRY){
print " failed.\n";
print "enter your CNS Password: ";
system("stty -echo");
chomp($passwd = <>);
system("stty echo");
print "\nVerifying user ... \n";
$res = $pamh->pam_authenticate;
$tryCount++;
}
--<snip>--
Hope this helps.
@
On Sat, Mar 13, 2004 at 11:43:28AM -0600, Stephen D. Wells wrote:
> Have a problem that has been drudged up from the last century....
>
> http://groups.google.com/groups?q=readline+socket+group:comp.lang.perl.modules&hl=en&lr=&ie=UTF-8&oe=UTF-8&group=comp.lang.perl.modules&c2coff=1&safe=off&selm=3706E49B.5AD0C8A%40cedarnet.org&rnum=3
> Unfortunately the code as posted doesn't exactly compile under 'use
> strict' you need to add:
>
> my $server_port = 6666;
>
> above the my $password line.
>
> Copy the code to a file and run it... in another window try:
>
> telnet 0 6666
>
> and enter a password...
>
> The noecho feature doesn't seem to kick in -- the client can still see
> the password. I can't believe that this is impossible to write in
> perl... Anyone have a suggestion?
>
> TIA,
> STEVE
> --
> Stephen D. Wells <wells at cedarnet.org>
>
> _______________________________________________
> Cedarvalley mailing list
> Cedarvalley at mail.pm.org
> http://mail.pm.org/mailman/listinfo/cedarvalley
--
Aaron Thompson Unix Systems Administrator, College of Natural Science
http://www.cns.uni.edu/~thompson/ University of Northern Iowa
"If there's anything more important than my ego around, I want it caught
and shot now." -Douglas Adams
More information about the Cedarvalley
mailing list