Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

Re: Perl NIS authentication

by idsfa (Vicar)
on Jun 29, 2007 at 13:39 UTC ( #624092=note: print w/ replies, xml ) Need Help??

in reply to Perl NIS authentication

Just thought that I would point out that this is a bad idea. The passwords you feed it on the command line will be visible as plain text in your shell's history file as well as in the process listing (ps). It would be much safer to feed sensitive information via STDIN.

Also, your "solution" code can fail quite easily. Consider what happens for the users alice and malice.

You may want to look at Authen::Simple::NIS.

use Authen::Simple::NIS; my $nis = Authen::Simple::NIS->new; if ( $nis->authenticate( $username, $password ) ) { # successfull authentication }

The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon

Comment on Re: Perl NIS authentication
Select or Download Code

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://624092]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (5)
As of 2015-10-10 01:01 GMT
Find Nodes?
    Voting Booth?

    Does Humor Belong in Programming?

    Results (254 votes), past polls