To anyone who may be able to help....
This is actually simple code and should work, but I am not an ASP pro and can't figure out why this isn't working for me.
This is what I am trying to implement...
Referring to an article "Changing Passwords", in the January 2001 issue of Windows 2000 Magazine, the author Ken Spencer's ASP code would definitely help my networks functionallity in a big way.
I have made it work with Windows NT 4.0. However, I am getting errors on line 23 when trying to implement the sConnectString line using the LDAP code. I tested the code by inserting a Response. Write after the LDAP code and the information seems to be passing correctly. When I attempt to execute the script through the Microsoft Explorer I get the following error code...
LDAP://CN=ssgas, OU=users, DC=spgrp, DC=net
error '8007054b'
/ChangePassword1.asp, line 23
The error code reveals a "cannot connect to domain" response. If I am passing through the proper LDAP code, I don't see why I am not connecting to the domain.I have posted the code below...
Any help with this would be greatly appreciated.
Thank you,
Tony
The first ASP page 'ChangePasswordEntry' is listed here...
Language=VBScript %>
<%
dim sUser, sPassword
dim oUser, sConnectString
sUser = request("txtUserName"
sPassword = request("txtPassword"
sNewPassword = request("txtNewPassword"
sConfPassword = request("txtConfPassword"
if sUser = "" then Response.Redirect "ChangePasswordEntry.asp"
if sNewPassword <> sConfPassword then Response.Redirect "BadPassword.htm"
sConnectString = "LDAP://CN=" & sUser & ", OU=users, " & "DC=spgrp, DC=net"
Response.Write sConnectString
Response.Write "<br>"
Set oUser = GetObject(sConnectString)
oUser.ChangePassword sPassword, sNewPassword
Response.Write "<Title> Password Changed </Title>"
Response.Write "<H3> " & sUser & ": Your password has been changed </H3> <br> <br>"
Response.Write "<p> Please click <a href= to return to main remote access page.</p>"
set oUser = Nothing
%>
The second ASP page which is posted to by the first is this...
Language=VBScript %>
<%
dim sUser, sPassword
dim oUser, sConnectString
sUser = request("txtUserName"
sPassword = request("txtPassword"
sNewPassword = request("txtNewPassword"
sConfPassword = request("txtConfPassword"
if sUser = "" then Response.Redirect "ChangePasswordEntry.asp"
if sNewPassword <> sConfPassword then Response.Redirect "BadPassword.htm"
sConnectString = "LDAP://CN=" & sUser & ", OU=users, " & "DC=spgrp, DC=net"
Response.Write sConnectString
Response.Write "<br>"
Set oUser = GetObject(sConnectString)
oUser.ChangePassword sPassword, sNewPassword
Response.Write "<Title> Password Changed </Title>"
Response.Write "<H3> " & sUser & ": Your password has been changed </H3> <br> <br>"
Response.Write "<p> Please click <a href= to return to main remote access page.</p>"
set oUser = Nothing
%>
This is actually simple code and should work, but I am not an ASP pro and can't figure out why this isn't working for me.
This is what I am trying to implement...
Referring to an article "Changing Passwords", in the January 2001 issue of Windows 2000 Magazine, the author Ken Spencer's ASP code would definitely help my networks functionallity in a big way.
I have made it work with Windows NT 4.0. However, I am getting errors on line 23 when trying to implement the sConnectString line using the LDAP code. I tested the code by inserting a Response. Write after the LDAP code and the information seems to be passing correctly. When I attempt to execute the script through the Microsoft Explorer I get the following error code...
LDAP://CN=ssgas, OU=users, DC=spgrp, DC=net
error '8007054b'
/ChangePassword1.asp, line 23
The error code reveals a "cannot connect to domain" response. If I am passing through the proper LDAP code, I don't see why I am not connecting to the domain.I have posted the code below...
Any help with this would be greatly appreciated.
Thank you,
Tony
The first ASP page 'ChangePasswordEntry' is listed here...
Language=VBScript %>
<%
dim sUser, sPassword
dim oUser, sConnectString
sUser = request("txtUserName"
sPassword = request("txtPassword"
sNewPassword = request("txtNewPassword"
sConfPassword = request("txtConfPassword"
if sUser = "" then Response.Redirect "ChangePasswordEntry.asp"
if sNewPassword <> sConfPassword then Response.Redirect "BadPassword.htm"
sConnectString = "LDAP://CN=" & sUser & ", OU=users, " & "DC=spgrp, DC=net"
Response.Write sConnectString
Response.Write "<br>"
Set oUser = GetObject(sConnectString)
oUser.ChangePassword sPassword, sNewPassword
Response.Write "<Title> Password Changed </Title>"
Response.Write "<H3> " & sUser & ": Your password has been changed </H3> <br> <br>"
Response.Write "<p> Please click <a href= to return to main remote access page.</p>"
set oUser = Nothing
%>
The second ASP page which is posted to by the first is this...
Language=VBScript %>
<%
dim sUser, sPassword
dim oUser, sConnectString
sUser = request("txtUserName"
sPassword = request("txtPassword"
sNewPassword = request("txtNewPassword"
sConfPassword = request("txtConfPassword"
if sUser = "" then Response.Redirect "ChangePasswordEntry.asp"
if sNewPassword <> sConfPassword then Response.Redirect "BadPassword.htm"
sConnectString = "LDAP://CN=" & sUser & ", OU=users, " & "DC=spgrp, DC=net"
Response.Write sConnectString
Response.Write "<br>"
Set oUser = GetObject(sConnectString)
oUser.ChangePassword sPassword, sNewPassword
Response.Write "<Title> Password Changed </Title>"
Response.Write "<H3> " & sUser & ": Your password has been changed </H3> <br> <br>"
Response.Write "<p> Please click <a href= to return to main remote access page.</p>"
set oUser = Nothing
%>