Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/bin/perl -w use strict; use CGI; use Win32::OLE; my $uname = "testuser"; my $pword = "password"; my $foo = &authuser($uname,$pword); my $query = CGI::new(); print $query->header; print "$foo \n"; sub authuser { my($uname,$pword) = @_; my $adpath = 'LDAP://DC=my,DC=domain,DC=edu'; my $strAttributeName = "userPrincipalName"; my $strAttributeValue = $uname; my $ad_server = Win32::OLE->GetObject ('LDAP:') or die $!; my $check_user = $ad_server->OpenDSObject($adpath, $uname, $pword, + 1); if (!Win32::OLE->LastError()) { return(1); } return(0); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Windows Authentication through IIS
by davidrw (Prior) on Jun 16, 2005 at 13:43 UTC | |
by Anonymous Monk on Jun 16, 2005 at 13:52 UTC | |
by strat (Canon) on Jun 17, 2005 at 07:52 UTC |