RE: Active Directory Password Script Error Trapping
- From: "Duckfather" <Duckfather@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sat, 20 Aug 2005 04:33:06 -0700
Thanks for the advice.
That got my code working fine with the error trapping :-)
That's a very good point about SSL. I think I had a mental block there.
Should have thought of that seeing as though I've just setup the SSL
certificates for our OWA connection!
And I like the idea about autogenerated passwords. My users will sulk like
hell, but lifes a bitch :-P
Cheers
Andy
"DAS2" wrote:
> I wrote a similar asp page for our company. trap the error that same way you
> would with any other script:
>
> If err.number = xxx Then
> 'do something
> Else
> 'do something else
> End if
>
> You should put an On Error Resume Next in your script, and you need the
> error number instead of 8007202f. To get that, put the wrong password in and
> this code:
>
> vbscript:
> wscript.echo err.number
>
> asp:
> response.write err.number
>
> The hard part is getting the permissions to work using a webpage. Ever
> heard of double-hop authintication? Arrrgggghhh!
>
> I would also suggest that you auto generate the password for the user and
> force the user to change password on next logon. That way, you know it will
> meet your company's password policy and you don't have to write error
> handling for that.
>
> And I'm sure you already know, you will want to to make sure the page is SSL.
>
> Hope that helps.
>
> "Duckfather" wrote:
>
> > Hi all
> >
> > I'm trying to write a web page to allows users to change their passwords
> > from our Intranet. I have used the script found in the TechNet Script
> > Repository for changing passwords successfully :-
> >
> > Set objUser = GetObject _
> > ("LDAP://cn=myerken,ou=management,dc=fabrikam,dc=com")
> > objUser.ChangePassword "i5A2sj*!", "jl3R86df"
> >
> > This works fine if all of the credentials are set ok.
> >
> > What I would like to know is how do I error trap this?
> > I need to be able to trap if the old password is incorrect (returns error
> > '8007202f') and also will need to know if the new password meets the Group
> > Policy complexity rules (no idea what the error code for this is yet as this
> > policy has yet to be implemented on our network).
> >
> > Any help would be greatly appreciated.
> >
> > Thanks in advance.
> >
> > Andy
.
- References:
- Active Directory Password Script Error Trapping
- From: Duckfather
- RE: Active Directory Password Script Error Trapping
- From: DAS2
- Active Directory Password Script Error Trapping
- Prev by Date: Re: redirect STDOUT to a variable
- Next by Date: Re: Convert vt date to datetime
- Previous by thread: RE: Active Directory Password Script Error Trapping
- Next by thread: Lab Printers
- Index(es):
Relevant Pages
|