Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create prograg to change password on NT

Status
Not open for further replies.

jono261970

Programmer
Joined
Jun 28, 2002
Messages
182
Location
GB
Hi,

I wondered if it were possible to create a program that would allow a member of staff to change student passwords on an NT 4.0 server.

We have used the user manager utility in the past but found it very unsafe as it allows you to modify and delete accounts.

Is this a major task for a beginner.

Any advice would be very much appreciated.

Kind regards,

jono
 
Dim usr As IADsUser
Set usr = GetObject("WinNT://Microsoft/JSmith,user")
usr.SetPassword "topsecret98"

just as a note you have to have rights under your security context to change the password first.

 
SemperFiDownUnda,

what do I reference so that I can do the following?

Dim usr As IADsUser
 
You need the Active Directory Services Interfaces stuff for it, which in turn presupposes that Active Directory is up and running. So, for most NT4 installations, it won't work.

For traditionalists :-) might I suggest investigating the NetUserChangePassword call? It does exactly what is says on the box...
 
Sorry about that it is the "Active DS Type Library"
And Strongm is right ... its a Active Directory thing....I missed that you where not running W2K
 
Hi all,

Thanks for your replies, However i`m still in the dark here!
What is the "NetUserChangePassword" call?

If What I want can`t be accomplished in VB are there any other programs out there other than the utility supplied by microsoft.

I have search the net but to no avail.

cheers

jono
 
When you say 'I have search the net but to no avail ', how exactly did you do that?

As a first try for any info of this kind, I just copy the words NetUserChangePassword from the question/answer and paste into Google's search window then add the word msdn.

It took 0.30 seconds to return 712 pages. In the first 20 there were at least 2 pointing to MSDN with the full answer to your question! Let me know if this helps
________________________________________________________________
If you are worried about how to post, please check out FAQ222-2244 first

'There are 10 kinds of people in the world: those who understand binary, and those who don't.'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top