Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Perl NIS authentication

by VinsWorldcom (Parson)
on Feb 20, 2013 at 19:59 UTC ( #1019837=note: print w/replies, xml ) Need Help??


in reply to Perl NIS authentication

Try:

use strict; use warnings;

at the top of your code to see some warnings / errors with what you posted.

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:

#!/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";

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1019837]
help
Chatterbox?
[choroba]: Your votes in your profile?
[ambrus]: pryrt: yes, there is. link "Your votes" from your profile page.
[ambrus]: (That link work two ways: from your own profile page, it lists all your votes; from anyone else's profile page, it lists your votes on that user's nodes only.)
[choroba]: Wow, and I can create an interesting statistics from it
[LanX]: I've also added a link "my votes" to the personal nodelet
[pryrt]: Thanks, that was what I was looking for

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (13)
As of 2017-03-29 13:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (351 votes). Check out past polls.