how to reset a logon password for multiple users in active directo

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In active directory (server 2003) I can select 8 users, right click and
enable multiple user accounts. However I am not able to select 8 users, right
click and reset the password, is there a utility that I can install?, how
does everyone else do it?

Alan Florence
 
In active directory (server 2003) I can select 8 users, right click and
enable multiple user accounts. However I am not able to select 8 users, right
click and reset the password, is there a utility that I can install?, how
does everyone else do it?

Alan Florence


If you have a file of Logon Names and new passwords,like
DoeJ password phrase
SmithH password sentence
etc...

open a CMD.EXE window and type

rsetpwd filename

Where rsetpwd.bat contains:

@echo off
if {%1}=={} @echo Syntax: rsetpwd filename&goto :EOF
if not exist %1 @echo Syntax: rsetpwd - %1 does NOT exist.&goto :EOF
setlocal ENABLEDELAYEDEXPANSION
set input=%1
for /f "Tokens=1*" %%a in ('type %input%') do (
set usr=%%a
set OK=N
call :uok>nul 2>&1
if "!OK!" EQU "N" @echo User %%a NOT found.
if "!OK!" EQU "Y" call :pwd %%a "%%b" >nul 2>&1
if "!OK!" EQU "X" @echo User %%a password error.
)
endlocal
goto :EOF
:uok
for /f "Tokens=*" %%u in ('net user %usr% /domain^|find "The command completed"') do (
set OK=Y
)
goto :EOF
:pwd
set OK=X
for /f "Tokens=*" %%u in ('net user %1 %2 /domain^|find "The command completed"') do (
set OK=Y
)
 
Back
Top