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