Question Resetting an AD Password?

Pie Captain

Member
Joined
Mar 31, 2010
Messages
14
Location
Bishops Waltham, Hampshire, United Kingdom
Programming Experience
1-3
Hi all,
First of all please let me apologise in advance. I'm not a VB programmer (not yet anyway).
I have been searching around for solutions to my problem, but the examples I find don't make sense to me, so please be patient!

Basically I have a textbox with a username and on tab out I want to be able to confirm the username exists, that its active and not disabled or locked out. I'd like output the result to a Label (E.G. if all is ok then "verified," if inactive then it says inactive etc). I have managed to find code to check an account exists in AD, but not its status, and I've not been able to expand on this. :(

next i need to be able to RESET password of the username.

The application will be running under a user account that has permissions to reset passwords. It will only be used for resetting passwords on the domain it's running in. Though it will be used on 2 different domains.
Some examples I've seen specify an LDAP path. Is this nessesary? or is VB able to pick up the AD server in the same way DSget or DSquery do?
I did find a bit of code that allows the searching of groups a user is a member of, and this did not need the LDAP path

i know i need to use
System.DirectoryServices
and then do something something with

DirectoryEntry()
DirectorySearcher()

but the examples I've found don't make sense to me :(

I'm using Visual Studio.net 2008

Sorry if all this is obvious stuff, but i have googled and googled but haven't found anything that "I" can use!

Thanks in advance!

P.S. yes i know i should do a course or get a "VB.net in 24 hours" type book. I do plan to do this, but in the mean time i need to get this done! :) )
 
Top Bottom