Solved

Remove "change password at next logon" from many accounts

Posted on 2001-08-27
4
169 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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

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…
We have come a long way with backup and data protection — from backing up to floppies, external drives, CDs, Blu-ray, flash drives, SSD drives, and now to the cloud.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now