Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Perl NIS authentication

by archfool (Monk)
on Jun 28, 2007 at 17:20 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://623950]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2024-04-18 11:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found