Home All Groups Group Topic Archive Search About

Change a windows user's password with C#?

Author
9 Aug 2005 9:22 AM
MadBison
Hello

I have gathered some code for changing a windows users password, but I
need a bit more info.

I want to change the password on several Winsows 2003 Server machines.
None of them are in a domain.

It appears that the WinNT directory services provider does not work on
Windows 2003 Server. I get a security message. It used to work fine on
Windows 2000 Server.

I understand that the LDAP Provider will not work unless the server is
part of a domain. Is this correct?

Is there any way forward for me given I have Windows 2003 Server
machines without a domain, and want to programatically change their
passwords?

Thanks
David

Author
9 Aug 2005 1:39 PM
Dominick Baier [DevelopMentor]
Hello MadBi***@gmail.com,

i am not sure if WinNT is not working anymore. But you should be able to
set a password via WMI.

Have a look at the SDK and the win32_account class. There is also a WMI newsgroup
on this server.

HTH

---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com

Show quoteHide quote
> Hello
>
> I have gathered some code for changing a windows users password, but I
> need a bit more info.
>
> I want to change the password on several Winsows 2003 Server machines.
> None of them are in a domain.
>
> It appears that the WinNT directory services provider does not work on
> Windows 2003 Server. I get a security message. It used to work fine on
> Windows 2000 Server.
>
> I understand that the LDAP Provider will not work unless the server is
> part of a domain. Is this correct?
>
> Is there any way forward for me given I have Windows 2003 Server
> machines without a domain, and want to programatically change their
> passwords?
>
> Thanks
> David