Monday, May 26, 2008

Reset bulk user passwords

To reset a user password and force him change at next logon:dsmod user "CN=user name,CN=Users,DC=test,DC=Com" -pwd dfsdsafd -mustchpwd yes
If you have a text file with user distinguished name, make a script similar to this:
for /f "delims=" tokens=1" %%i in (user distinguished name.txt) do
dsmod user "%%i" -pwd dfsdsafd -mustchpwd yes
This is the help for the for statement:http://www.ss64.com/nt/for_f.html

No comments: