Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Perl NIS authentication

by archfool (Monk)
on Jun 28, 2007 at 17:20 UTC ( #623950=note: print w/replies, xml ) Need Help??


in reply to Perl NIS authentication

Can't you just do a getpwnam and getpwuid and a crypt? NIS is just like files to any program on the OS.

Replies are listed 'Best First'.
Re^2: Perl NIS authentication
by tercel04 (Initiate) on Jun 28, 2007 at 18:43 UTC
    I did not try that. But I got it to work this way
    use APR::Util();
    @hashpasswd = split(":",chomp($yppasswd = `ypcat passwd | grep $user:`));
    $ok = APR::Util::password_validate($passwd, $hashpasswd\1\); if($ok == 1) { ## Valid User
    }else { ## Invalid user
    }
    Thanks for the reply!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2020-11-25 19:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?