note
VinsWorldcom
<p>Try:</p>
<c>
use strict;
use warnings;
</c>
<p>at the top of your code to see some warnings / errors with what you posted.</p>
<p>I don't have a NIS server to test against, but I'm willing to bet if your credentials are correct, the following (untested) may work:</p>
<c>
#!/usr/bin/perl
use strict;
use warnings;
use Net::NIS;
use Authen::Simple::NIS;
my $default_domain = Net::NIS::yp_get_default_domain();
my $nis = Authen::Simple::NIS->new(domain => $default_domain);
if ($nis->authenticate("user", "testpass")) {
print "Success\n"
}
print "done\n";
</c>
1019828
1019828