unabel to find PasswordExpairation date using Winnt provider

S

Sudeep Batra

I was able to use the following asp page in Windows 2000 to find the
password expiration date for the users in Microsoft AD.....but after
upgrading to Windows 2003 ,this script is not working..can some one help

Regards,

Sudeep



<html>
<head><title>Check Your Password Expiry Date - Result</title>
<style type="text/css">
<!--
..style7 { font-size: 14pt;
font-family: Verdana, Arial, Helvetica, sans-serif;
color: #0000FF;
}
..style8 { font-size: 16pt;
color: #FF3300;
}
-->
</style>
</head>
<body>

<body bgcolor="#eeeefd">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center" class="style8"> IBP Company Limited</div></td>
</tr>
</table>
<div align="center">
<p>&nbsp;</p>
<p><strong><font color="#003399" size="4"><u>Domain Password Expiry Date
Check - Result</u></font></strong> <font color="#003399" size="4"><br>
</font>
</p>
</div>
<div align="center">
<p><font face="Arial" size="4" style="Bold">
<%

On Error Resume Next
set objUser=GetObject("WinNT://ibpoil/" & request.form("username") &
",user")

if IsObject(objUser) then



Response.Write "Username : &nbsp;" & objUser.FullName & "&nbsp;("
&objUser.Name & ")"



Response.Write "<br>Password Expiry Date : &nbsp" &
objUser.PasswordExpirationDate

%>

</font>
<br>
<br>
<br>
<br>
<a href="pass_exp.htm">
<img alt="Back to Check Password Expiry Date Page" border="0"
src="arrow15.gif" width="50" height="20"></a> </p>
</div>
<div align="center">
<%
else

Response.Write "<br><br><br> &nbsp &nbsp User ID Does Not
Exist.<br><br><br>"
Response.Write "&nbsp &nbsp "
%>

<a title="Please Click to try again" href="pass_exp.htm">
Please Try Again</a>

<%
Response.End
end If

%>


</div>
</body>
</html>
 
C

Chriss3 [MVP]

Anonymous LDAP queries are disabled for security reasons in Windows Server
2003 Active Directory.

Anonymous LDAP operations to Active Directory are disabled on Windows Server
2003 domain controllers:
http://support.microsoft.com/default.aspx?scid=kb;en-us;326690

Instead of using WINNT Provider, use LDAP and run your Active Server Pages
under an account that has right to query the directory service.

--
Regards
Christoffer Andersson
Microsoft MVP - Directory Services

No email replies please - reply in the newsgroup
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top