Solved

Want to script using setpassword.exe command

Posted on 2007-03-18
4
554 Views
Last Modified: 2008-02-01
I want to create a script using the setpassword.exe command but I cant seem to find the .exe file on my 2003 server SP1.  have installed the res kit tools and still cant locate it. Any suggestions where this is located?
thanks
0
Comment
Question by:Jamesm007
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 14

Expert Comment

by:Erik Pitti
ID: 18746552
if you're trying to write a script that will set user account passwords for a server or domain you can use the net user command to do so.

Local accounts:
net user <username> <password>

Domain Accounts:
net use <username> <password> /domain

As far as I recall the setpassword.exe is not part of any Microsoft toolset. I did however find it as a C# programming example here: http://www.c-sharpcorner.com/UploadFile/ecabral/ADand.NET08242005065451AM/ADand.NET.aspx
0
 
LVL 1

Author Comment

by:Jamesm007
ID: 18804780
net use <username> <password> /domain
I dont know how this will work as isnt net use a resourse command. I have tried what you have suggested with net use but this does not work :(
0
 
LVL 14

Accepted Solution

by:
Erik Pitti earned 125 total points
ID: 18806077
I'm not sure what you mean by resource command.  

Also there is a typo in the "domain accounts" syntax.  It should be as follows:
net user <username> <password> /domain

If the accounts you are trying to set the password for are in an Active Directory domain use the "domain accounts" syntax.  
If the accounts exist only on the one server, use the "local accounts" syntax.

0
 
LVL 1

Author Comment

by:Jamesm007
ID: 18980573
This should do the trick, now I need to figure out how t put it into a VB mini program so i can be done with a seies of pompts by a user.
0

Featured Post

Free eBook: Backup on AWS

Everything you need to know about backup and disaster recovery with AWS, for FREE!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Numerous times I have been asked this questions that what is it that makes my machine log on so slow, there have been cases where computers took 23 minute exactly after taking password and getting to the desktop. Interesting thing was the fact th…
Restoring deleted objects in Active Directory has been a standard feature in Active Directory for many years, yet some admins may not know what is available.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question