[windows2000] Re: Setting password expiration

  • From: "Michael Karasch" <karasch@xxxxxxxxxxxx>
  • To: <windows2000@xxxxxxxxxxxxx>
  • Date: Thu, 2 Jan 2003 17:16:09 -0600

Cusrmgr was the program I was thinking of. =20

Thanks, this is a huge help.

Michael Karasch
Technical Support Specialist - SOIS
karasch@xxxxxxxxxxxx
http://www.uwm.edu/~karaschm
=20
"Blessed are the geek, for they shall internet the Earth."


-----Original Message-----
From: Steven Peck DNET [mailto:speck@xxxxxxxxxxxx]=20
Sent: Thursday, January 02, 2003 2:13 PM
To: 'windows2000@xxxxxxxxxxxxx'
Subject: [windows2000] Re: Setting password expiration=20



What a coincidence, I just made this a few weeks ago, cobbled together
from
a few sources.

Create a user_list.txt file for the user names, add cusrmgr and go.

-sp

-------- Start ---------------
01 @echo off
02 REM
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
03 REM NAME: ForcePWchange.bat
04 REM AUTHOR: Steven Peck
05 REM DATE  : 11/14/2002
06 REM COMMENT: Force reset of the change password bit in user accounts
07 REM REQUIRES:  cusrmgr.exe from the Windows NT or 2000 Resource Kit
08 REM
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
09=20
10 REM Set variables =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D
11 REM Change CHANGEME to name of the Primary Domain Controller
12 Set PDC=3DCHANGEME
13=20
14 REM Script Readiness Check  =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D
15 if not "%OS%" =3D=3D "Windows_NT" goto :exit
16 if %PDC%=3D=3DCHANGEME ECHO Replace CHANGEME with the name ofyour PDC
&goto
:EOF
17 IF NOT EXIST user_list.txt ECHO This Script requires that
USER_LIST.TXT
be present in the same directory as this script in order to function
properly. &goto :EOF
18 IF NOT EXIST CUSRMGR.EXE ECHO This Script requires that CUSRMGR.EXE
be
present in the same directory as this script in order to function
properly.
&goto :EOF
19=20
20 :MAIN=20
21 REM Main body  =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D
22 REM SET the Primary Domain COntroller=20
23 for /f %%i in (user_list.txt) do (cusrmgr.exe -u %%i -m \\%PDC% +s
MustChangePassword)
24=20
25 goto :EOF
26
27 :EXIT
28   echo This script requires either Windows NT or Higher
--------- END -----------------
-----Original Message-----
From: Michael Karasch [mailto:karasch@xxxxxxxxxxxx]=20
Sent: Thursday, January 02, 2003 10:17 AM
To: windows2000@xxxxxxxxxxxxx
Subject: [windows2000] Setting password expiration=20



Hi All,

I've got about 50 new student accounts and I'd like to have them change
their passwords when they log in.  I had a Perl script to set all the
passwords to expired, but I can't find it. The real question is: what is
the program that can set password expiration dates from the command
line?  I think it's something in the 2k resource kit, but I don't
remember what it is.  Otherwise, does anyone else have an idea how to
force users to change passwords without applying the setting to all
users on the domain or changing the properties individually in active
directory?

Thanks,

Michael Karasch
Technical Support Specialist - SOIS
karasch@xxxxxxxxxxxx
http://www.uwm.edu/~karaschm
=3D20
"Blessed are the geek, for they shall internet the Earth."

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

==================================
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

Other related posts: