Solved

Remove "change password at next logon" from many accounts

Posted on 2001-08-27
4
179 Views
Last Modified: 2010-04-13
I am in the process of testing our Win2k migration and I have run into a small problem I need to resolve.  When I use the Active Directory Migration Tool to migrate users from the NT4 domain to the AD domain it automatically sets the option for users to change their passwords at the next logon.  How can remove that check from a large group of users at one time?
0
Comment
Question by:g0swell
  • 2
4 Comments
 
LVL 9

Expert Comment

by:schmiegu
ID: 6429881
Can be done using VB, VBScript or other languages, that supports ActiveX controls (in this case you need ADSI and ADO).

From ADSI SDK:

User Must Change Password at Next Logon

To enable this option, set the pwdLastSet attribute to zero(0). To clear this flag, set the attribute to -1.

Example Code [Visual Basic]

Set usr = GetObject("LDAP://CN=John Smith, OU=Sales, DC=Acme, DC=Com")
usr.Put "pwdLastSet", CLng(0)
usr.SetInfo

There is a lot of sample code for getting  all users from AD and how to bind to a user from this query to set properties (search for ADSI on msdn.microsoft.com).
0
 
LVL 25

Accepted Solution

by:
dew_associates earned 100 total points
ID: 6430768
I'd use: CUSRMGR

But this may help you as well. Here are some command-line and GUI tools to replace and/or supplement "User Manager for Domains", especially if you have to create/modify many accounts at one time:


GUI

* AdmWin ................. http://www.admwin.com/
* Domain Assistant ....... http://www.softwareshelf.com/products/domain.asp
* Hyena .................. http://www.systemtools.com/hyena/
* Network ServaNT ........ http://www.engagent.com/ns/ns_default.asp
* UltraAdmin ............. http://www.ultraadmin.com/
* User Manager Pro ....... http://www.lanicu.com/products/nt_frame.htm


CONSOLE COMMANDS

* NET USER ............... Native Command
* ADDUSERS ............... Resource Kit
* CUSRMGR ................ Resource Kit -- Win2K

* EXPORTER ............... http://www.systemtools.com/free_frame.htm
* NETUSERS ............... http://www.systemtools.com/free_frame.htm
* NETVIEW ................ http://www.systemtools.com/free_frame.htm

* AIXNT Utils ............ http://maxx.mc.net/~jlh/nttools/html/nttools.htm
* DameWare Utils ......... http://www.dameware.com/
* NTSEC UTILS ............ http://www.pedestalsoftware.com/


WHITEPAPERS & TECH DOCUMENTS

* http://support.microsoft.com/support/kb/articles/Q199/8/78.ASP
* http://msdn.microsoft.com/library/periodic/period98/ewn0498.htm
* http://support.microsoft.com/support/kb/articles/Q251/3/94.ASP
* http://support.microsoft.com/support/kb/articles/Q137/9/78.asp


PERSONAL NOTES

AdmWin (particularly SetupBatcher) is an excellent utility for configuring large groups of users.  ADDUSERS is also widely used, but AdmWin is far more comprehensive.


RELATED SCRIPTS (ALSO IN THIS ARCHIVE)

* http://www.ultratech-llc.com/KB/Scripts/?File=AcctInfo.BAT
* http://www.ultratech-llc.com/KB/Scripts/?File=ChangePWD.BAT
* http://www.ultratech-llc.com/KB/Scripts/?File=DupPerms-A.BAT
* http://www.ultratech-llc.com/KB/Scripts/?File=DupPerms-B.BAT
* http://www.ultratech-llc.com/KB/Scripts/?File=HomeDirs-A.BAT
* http://www.ultratech-llc.com/KB/Scripts/?File=HomeDirs-B.BAT
* http://www.ultratech-llc.com/KB/Scripts/?File=HomePerms.BAT


RELATED TOPICS (ALSO IN THIS ARCHIVE)

* http://www.ultratech-llc.com/KB/?File=HomeDirs.TXT
* http://www.ultratech-llc.com/KB/?File=Passwords.TXT
* http://www.ultratech-llc.com/KB/?File=Delegate.TXT
* http://www.ultratech-llc.com/KB/?File=CopyProfile.TXT
* http://www.ultratech-llc.com/KB/?File=ResKit.TXT
* http://www.ultratech-llc.com/KB/?File=Scripting.TXT
* http://www.ultratech-llc.com/KB/?File=ToolKit.TXT
* http://www.ultratech-llc.com/KB/?File=Utils.TXT

Dennis
0
 

Author Comment

by:g0swell
ID: 6445068
cusrmgr is perfect.
0
 
LVL 25

Expert Comment

by:dew_associates
ID: 6445083
Glad I could help!
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

NTFS file system has been developed by Microsoft that is widely used by Windows NT operating system and its advanced versions. It is the mostly used over FAT file system as it provides superior features like reliability, security, storage, efficienc…
Starting your own business is always a daunting process, and for most people it is brand new experience. Avoid the common pitfalls by following these tips to start on the road to success.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question