mthomas08 Posted November 9, 2009 Posted November 9, 2009 Wish it was that simple, I gave that a try but it still will not record username. Even as my self (admin access). Really not sure what to do next, does it take the actual %username% or would it take the display name or other information to get it?
plexer Posted November 9, 2009 Author Posted November 9, 2009 Do you have the authentication on the web site setup correctly as it needs that to get the username? Ben
elearngeek Posted January 7, 2010 Posted January 7, 2010 I'm having a bit of a problem implementing this. does anyone have an updated link of the screencasts? I just want to go over the video to make sure I've done everything right. Here my issue: I can register the user and even update the questions... but I have a problem when trying to reset the password. Most of the time it tells me that the username is not registered. Occasionally it will take me to the question screen then to the password screen but when I enter the new password it does not take no error just the new password doesn't work. I have edited the cred.ini with a username and password that have access to do this. The problem may be with the ADODB as I did not really understand how to do this.. I think I did it right but not sure. Anyways any help will be very much appreciated. Thanks!!!
elearngeek Posted January 8, 2010 Posted January 8, 2010 OK so I opened up the data base and the username is not being recorded. The answers are but the username is left blank. Any ideas? If I type in the name manually in the database I can reset the password.
elearngeek Posted January 9, 2010 Posted January 9, 2010 ok so I got the database entering the username by unchecking the anonymous acess... Duh! Also the reseting password works the only issue I have now is with the Admin pages. I have a group called admingroup and have added my account to that group but I get a "you are not autherized to access this service" I can however access it on the DC by going to http://HttP://localserver/admin/index.asp
1of2Techs Posted January 22, 2010 Posted January 22, 2010 Our department has been researching various password reset solutions and I'd like to test this one. My supervisor reviewed this forum and asked me to find a University/College that is larger than we are that has implemented this solution. We have a full time equivelent of 2,400. Has anyone coded this to work with SQL? I'm nervous about using an Access database for anything that is going to contain identifying information. Thanks
plexer Posted January 27, 2010 Author Posted January 27, 2010 ok so I got the database entering the username by unchecking the anonymous acess... Duh! Also the reseting password works the only issue I have now is with the Admin pages. I have a group called admingroup and have added my account to that group but I get a "you are not autherized to access this service" I can however access it on the DC by going to http://HttP://localserver/admin/index.asp Is that admingroup named the same as the one you have specified in the config file? Ben
plexer Posted January 27, 2010 Author Posted January 27, 2010 Our department has been researching various password reset solutions and I'd like to test this one. My supervisor reviewed this forum and asked me to find a University/College that is larger than we are that has implemented this solution. We have a full time equivelent of 2,400. Has anyone coded this to work with SQL? I'm nervous about using an Access database for anything that is going to contain identifying information. Thanks Hi, If you see the announcement about version 3 then this is what will happen allthough I don't have a timescale as of yet. Thanks. Ben
zbjsy Posted January 29, 2010 Posted January 29, 2010 You've already tried the only ideas I currently have for unlocking an account from asp. However I find it hard to believe that Microsoft would prevent/omit unlocking accounts via vb so I'm sure there must be a way of doing it. I'll see what I can find over the next few days and hopefully run some tests next week. Only just seen your script today so have been playing around with it. Have problems with the unlock accounting as well, just can't get it to work. I can unlock accounts via a vbs script, but can't seem to unlock account via .asp, even using the same commands v.annoying!
plexer Posted January 29, 2010 Author Posted January 29, 2010 woo! can now unlock accounts Using what method? Thanks. Ben
zbjsy Posted January 29, 2010 Posted January 29, 2010 here you go, change your resetpass function to this, and change value NetBiosName Function ResetPass 'Begin Password Reset Code Dim usr, oUser, oFlags Err.Clear 'Connect to Active Directory, reset and expire password Set objLogon = Server.CreateObject("LoginAdmin.ImpersonateUser") objLogon.Logon ImpersonateUser, ImpersonateUserPass, FQDN 'START OF CODE FOR LDAP ' Constants for the NameTranslate object. Const ADS_NAME_INITTYPE_GC = 3 Const ADS_NAME_TYPE_NT4 = 3 Const ADS_NAME_TYPE_1779 = 1 ' Specify the NetBIOS name of the domain and the NT name of the user, Change NetBiosName to your NetBiosName. strNTName = "NetBiosName" & "\" & strusername ' Use the NameTranslate object to convert the NT user name to the ' Distinguished Name required for the LDAP provider. Set objTrans = CreateObject("NameTranslate") ' Initialize NameTranslate by locating the Global Catalog. objTrans.Init ADS_NAME_INITTYPE_GC, "" ' Use the Set method to specify the NT format of the object name. objTrans.Set ADS_NAME_TYPE_NT4, strNTName ' Use the Get method to retrieve the RPC 1779 Distinguished Name. strUserDN = objTrans.Get(ADS_NAME_TYPE_1779) 'END OF CODE FOR LDAP to replace Getobject("WinNt: 'Set oUser = GetObject("WinNT://" & FQDN & "/" & strusername & ",user") ' Bind to the user object in Active Directory with the LDAP provider. Set oUser = GetObject("LDAP://" & strUserDN) If Err.number <> 0 Then PageContent(0) = "Error: Unable to bind to container" Else 'Commented out the commands below as they were causing conflicts 'oFlags = oUser.Get("UserFlags") 'PageContent(0) = "Resetting password for " & strusername & " ... " On Error Resume Next oUser.SetPassword( NewPassword ) If (Err.number <> 0) Then If AdminName = "" Then PageContent(0) = PageContent(0) & "An unexpected error occurred in the execution of this page Please report the following information to an " AdminName = "Administrator" Else PageContent(0) = PageContent(0) & "An unexpected error occurred in the execution of this page Please report the following information to " End If Select Case AdminLinkType Case 1 'No link PageContent(0) = PageContent(0) & AdminName Case 2 'Mailto: PageContent(0) = PageContent(0) & "" & AdminName & "" Case 3 'Web Link PageContent(0) = PageContent(0) & "" & AdminName & "" Case Else PageContent(0) = PageContent(0) & AdminName End Select PageContent(0) = PageContent(0) & " Page Error Object Error Number: " & Err.Number & " Error Description: " & Err.Description & " Source: " & Err.Source & " LineNumber: " & Err.HelpContext & "" Else 'oUser.Put "PasswordExpired", CLng(1) 'Commented out the above command, as it did not work with LDAP, the below command does. It forces the user to the Change their password the next time they logon oUser.LockoutTime = 0 oUser.SetInfo oUser.Put "PwdLastSet", 0 oUser.SetInfo oUser.Put "userAccountControl", 544 oUser.SetInfo Set oUser = Nothing PageContent(0) = "Resetting password for " & strusername & " ... " PageContent(0) = PageContent(0) & "Your password is now " & NewPassword & "" If PwdType <> 5 Then PageContent(0) = PageContent(0) & " please logon and change this." End If PageContent(0) = PageContent(0) & " Press Ctrl-Alt-Del and Log Off..." 'Create an ADO recordset object Set rsRegisterUser = Server.CreateObject("ADODB.Recordset") 'Initialise the strSQL variable with an SQL statement to query the database If removeOnReset Then 'Remove user from SSPR database strSQL = "DELETE FROM tblmain WHERE username='" & strusername & "';" Else 'Reset failed reset counter strSQL = "UPDATE tblmain SET counter='0' WHERE username='" & strusername & "';" End If 'rsRegisterUser.Open strSQL, adoCon adoCon.Execute strSQL 'rsRegisterUser.Close Set rsRegisterUser = Nothing Set adoCon = Nothing End If End If 1
zbjsy Posted February 1, 2010 Posted February 1, 2010 oUser.LockoutTime = 0 oUser.SetInfo oUser.Put "PwdLastSet", 0 oUser.SetInfo oUser.Put "userAccountControl", 544 oUser.SetInfo just to expand, I found that if I didn't have "oUser.SetInfo" after each setting it wouldn't always unlock, strange I know, and only works using an ldap connection.
smhopkins Posted February 2, 2010 Posted February 2, 2010 I've tried downloading every attached version of this app that I've seen and they all show up as corrupt when I try to open them, regardless of what program I use. I there another location where the latest version of the files is store that I can access them? The program sounds great from what I've read and I'm ancious to try it. Thanks for the time you've invested in it.
zbjsy Posted February 4, 2010 Posted February 4, 2010 I downloaded from : http://sspr.googlecode.com/files/SSPR%202.2.2.zip and had no problems
smhopkins Posted February 5, 2010 Posted February 5, 2010 I have now, thanks. Hopefully I can get it setup today.
elearngeek Posted February 8, 2010 Posted February 8, 2010 Is that admingroup named the same as the one you have specified in the config file? Ben Thanks! it works now...
ramadan37 Posted April 27, 2010 Posted April 27, 2010 Hi, Need help here... I already installed/setup SSPR 2.2.2. Everything works fine except the reset function. I can register, modify & change, but cannot reset... I got this error if i try to reset... Resetting password for xxxxxxx ... An unexpected error occurred in the execution of this page Please report the following information to an Administrator Page Error Object Error Number: -2147024891 Error Description: General access denied error Source: Active Directory LineNumber: 0 Anybody have any ideas ??? TQ
plexer Posted April 30, 2010 Author Posted April 30, 2010 Is that from the admin pages or the login that the students would use to reset their own password? Ben
ramadan37 Posted April 30, 2010 Posted April 30, 2010 Is that from the admin pages or the login that the students would use to reset their own password? Ben it's from the login that student would use to reset their own passwd... FYI, we are using windows server 2008 standard.
MikeHowarth Posted May 6, 2010 Posted May 6, 2010 Ok I was just clasping at some coding straws really I'll have to test it. Try changing it to: oUser.Put IsAccountLocked = FALSE Hi After looking at this i resolved the error with unlocking the accounts by amending the code with this oUser.Put "IsAccountLocked", CLng(0) oUser.IsAccountLocked = False oUser.SetInfo Set oUser = Nothing Regards Mike 1
plexer Posted May 6, 2010 Author Posted May 6, 2010 it's from the login that student would use to reset their own passwd... FYI, we are using windows server 2008 standard. Hi Ok, This hasn't been tested with server 2008 by me, I wonder if anyone else is using it on server 2008. I am sure we can solve it. Ben
plexer Posted May 6, 2010 Author Posted May 6, 2010 Hi After looking at this i resolved the error with unlocking the accounts by amending the code with this oUser.Put "IsAccountLocked", CLng(0) oUser.IsAccountLocked = False oUser.SetInfo Set oUser = Nothing Regards Mike Thanks for that Mike. I'll add it to the code base and add an acknowledgement as well. Thanks. Ben
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now