RE: Active Directory Password Script Error Trapping

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



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
.



Relevant Pages

  • RE: Active Directory Password Script Error Trapping
    ... I wrote a similar asp page for our company. ... You should put an On Error Resume Next in your script, ... > What I would like to know is how do I error trap this? ... > Policy complexity rules (no idea what the error code for this is yet as this ...
    (microsoft.public.windows.server.scripting)
  • Re: SSL connections through firewall
    ... Subject: SSL connections through firewall ... >I read up about SSL as a protocol and about public key encryption, ... I have no help from the firms Internet policy to guide me ... The major decision here, not surprisingly, is one of corporate policy, not ...
    (Security-Basics)
  • Re: PHP and SSL Path Reference
    ... > I am trying to implement SSL with PHP. ... > script works fine. ... > script does display the contents of the reference. ...
    (php.general)
  • AW: SSL connections through firewall
    ... If you open SSL on your Firewall, the data stream goes, without ... I have no help from the firms Internet policy to guide me ... The major decision here, not surprisingly, is one of corporate policy, not ...
    (Security-Basics)
  • RE: SSL connections through firewall
    ... Subject: SSL connections through firewall ... -For virus protection, have a corporate version of Virus Server. ... Subject: AW: SSL connections through firewall ... The major decision here, not surprisingly, is one of corporate policy, not ...
    (Security-Basics)