[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 307
  • Last Modified:

USER PASSWORD RESET FROM DESKTOP

Hi All,

I have a client who wants to be able to run a small file from their workstation at their office and reset a user's password.  I know how to use the "NET USE" command to reset a domain users' password. It's been many years since I worked with batch files.

The environment:
Windows server 2008 PDC (Domain controller)
All other workstations are running Windows 7 Ultimate


The client simply wants a little icon to click on, enter user name and change password. Can someone offer a free solution or a batch file for me regarding this ?  The ultimate goal here is to provide the abilty to reset passwords so that someone does not need to remote into the domain controller in order to do this.

Thanks !!  :-)
0
PAULADAMSJR
Asked:
PAULADAMSJR
  • 3
  • 3
1 Solution
 
mlchelpCommented:
here you go, simple batch file that will prompt for user name and then prompt you for the new password and make you confirm the password, it will be hidden as you type it, Im attaching the batch file as well. User executing this must be domain admin. it wouldnt let me attach a .bat file, so after you download it, change it from .txt to .bat and place on thier desktop.


set /p userin=Please enter user name:
net user %userin% * /DOMAIN
userpassreset.txt
0
 
PAULADAMSJRAuthor Commented:
This tiny little batch file worked perfect. Now, before I close the question, do you think there is a way to ask if there is another one that needs to be reset before ending and if so, loop back ?

Thanks !!
0
 
mlchelpCommented:
here it is, I aldo turned echo off to clean it up, you can reset as many as you want

echo off
:start
set /p userin=Please enter user name:
net user %userin% * /DOMAIN
set /p choice=Would you like to reset another user? ? Press 'y' and enter for Yes:
if not '%choice%'=='' set choice=%choice:~0,1%
if '%choice%'=='y' goto start
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
PAULADAMSJRAuthor Commented:
Worked Perfect. Giving full points !!   Thanks a million !!
0
 
PAULADAMSJRAuthor Commented:
Worked perfect !!  Thanks !!
0
 
mlchelpCommented:
no problem, glad to help
0

Featured Post

Making Bulk Changes to Active Directory

Watch this video to see how easy it is to make mass changes to Active Directory from an external text file without using complicated scripts.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now