Change all user passwords
Windows Server Forum Index Windows Server
Server discussion on Windows platform.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web winserverhelp.com
Change all user passwords

 
Post new topic   Reply to topic    Windows Server Forum Index -> Programming
Author Message
Michael11
Guest





Posted: Mon Dec 20, 2004 8:25 pm    Post subject: Change all user passwords Reply with quote

Does anyone have or know of a script to change all user passwords to a
default (1234) ? We need to "reset" 400 student accounts to a default
password so they can change them again. The accounts are already created and
in OU's. We are running 2003 standard server with W2K workstations.

Thanks
Back to top
Torgeir Bakken (MVP)
Guest





Posted: Mon Dec 20, 2004 8:28 pm    Post subject: Re: Change all user passwords Reply with quote

Michael11 wrote:

Quote:
Does anyone have or know of a script to change all user passwords to a
default (1234) ? We need to "reset" 400 student accounts to a default
password so they can change them again. The accounts are already created and
in OU's. We are running 2003 standard server with W2K workstations.

Thanks
Hi


See the Set/Reset password scripts here for a starting point:

http://www.rlmueller.net/freecode4.htm


--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
Back to top
Ray Costanzo [MVP]
Guest





Posted: Mon Dec 20, 2004 8:43 pm    Post subject: Re: Change all user passwords Reply with quote

You could enter this at the command prompt:

for /f "tokens=1-3 skip=3" %a in ('net user') do net user %a 1234& net user
%b 1234& net user %c 1234

Ray at work

"Michael11" <Michael11@discussions.microsoft.com> wrote in message
news:17C14D8A-F6C2-4B4D-80DA-732BBA6BB6F5@microsoft.com...
Quote:
Does anyone have or know of a script to change all user passwords to a
default (1234) ? We need to "reset" 400 student accounts to a default
password so they can change them again. The accounts are already created
and
in OU's. We are running 2003 standard server with W2K workstations.

Thanks
Back to top
Al Dunbar [MS-MVP]
Guest





Posted: Tue Dec 21, 2004 8:58 am    Post subject: Re: Change all user passwords Reply with quote

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:eRuqEJq5EHA.1260@TK2MSFTNGP12.phx.gbl...
Quote:
You could enter this at the command prompt:

for /f "tokens=1-3 skip=3" %a in ('net user') do net user %a 1234& net
user
%b 1234& net user %c 1234

Ray at work

"Michael11" <Michael11@discussions.microsoft.com> wrote in message
news:17C14D8A-F6C2-4B4D-80DA-732BBA6BB6F5@microsoft.com...
Does anyone have or know of a script to change all user passwords to a
default (1234) ? We need to "reset" 400 student accounts to a default
password so they can change them again. The accounts are already created
and
in OU's. We are running 2003 standard server with W2K workstations.

Just as a word of caution, if just two of the 400 students compare notes,
they will quickly be able to figure out how to logon to the other 398
accounts, or at least the ones that have not yet been logged into.

I would recommend a script that, for each user, does the following:

- generates a random password (i.e. a random number between 1000 and
9999 might be sufficient).
- displays the username/password combo in a text file to be printed, or
prints out directly onto label paper.

You then distribute these to the students on a personal, one-on-one basis.
Could be via the post, by interoffice mail, or they come in and sign for the
password.

Good security is only seen as too expensive once it is too late.

/Al
Back to top
Al Dunbar [MS-MVP]
Guest





Posted: Tue Dec 21, 2004 10:26 am    Post subject: Re: Change all user passwords Reply with quote

"Al Dunbar [MS-MVP]" <alan-no-drub-spam@hotmail.com> wrote in message
news:Oz1Wqjw5EHA.828@TK2MSFTNGP14.phx.gbl...

<snip>

Quote:
Good security is only seen as too expensive once it is too late.


Obviously this was meant to read:

"Good security is only seen as too expensive BEFORE it is too late."

/Al
Back to top
Ray Costanzo [MVP]
Guest





Posted: Tue Dec 21, 2004 9:19 pm    Post subject: Re: Change all user passwords Reply with quote

Good point. Having everyone's password the same probably wouldn't be ideal.
One could use the built-in random password generation.

for /f "tokens=1-3 skip=3" %a in ('net user') do net user %a /random& net
user %b /random& net user %c /random

Granted, that will just display the users' passwords on the screen. You
could put it in a batch like

for /f "tokens=1-3 skip=3" %%a in ('net user') do call :setPass %%a& call
:setPass %%b& call :setPass %%c
goto :eof

:setPass
set u=%1
net user %u% /random>%u%.txt

Ray at work

"Al Dunbar [MS-MVP]" <alan-no-drub-spam@hotmail.com> wrote in message
news:Oz1Wqjw5EHA.828@TK2MSFTNGP14.phx.gbl...
Quote:

Just as a word of caution, if just two of the 400 students compare notes,
they will quickly be able to figure out how to logon to the other 398
accounts, or at least the ones that have not yet been logged into.

I would recommend a script that, for each user, does the following:

- generates a random password (i.e. a random number between 1000 and
9999 might be sufficient).
- displays the username/password combo in a text file to be printed,
or
prints out directly onto label paper.

You then distribute these to the students on a personal, one-on-one basis.
Could be via the post, by interoffice mail, or they come in and sign for
the
password.

Good security is only seen as too expensive once it is too late.

/Al

Back to top
 
Post new topic   Reply to topic    Windows Server Forum Index -> Programming All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




New Topics Powered by phpBB