Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

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

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://624092]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (8)
As of 2017-09-24 09:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    During the recent solar eclipse, I:









    Results (273 votes). Check out past polls.

    Notices?