kriss
kriss

Reputation: 24207

What API can be used to change windows account information remotely?

What API is available to change windows account passwords remotely? Assuming I have the proper credentials to change the windows accounts, I need to write software that can do so remotely.

The software will run on Linux, and so far it appears that SMB may have some functionality in this area, but I need either an API, library, code, or even the right key words to help me figure out how to search for solutions or an approach to solving this problem.

I've found Wmi client on Linux but as far as I understand there seems to be issues with it.

Upvotes: 3

Views: 1204

Answers (2)

kadi
kadi

Reputation: 182

Try:

smbpasswd -r machine -U user.

You can use wmi-client, but on the other hand that does not work on windows 2008 server with domain controller and the password is passed in the network without encryption.

Upvotes: 1

jelmer
jelmer

Reputation: 2450

The smbpasswd command that is part of Samba allows you to change the password on remote machines. E.g.

smbpasswd -r MACHINE -U USER

You should be able to just invoke that command from your favorite programming language; the next version of Samba will have some Python APIs that probably also allow you to do this from within Python.

Upvotes: 1

Related Questions