#28554 - 2002-09-07 06:25 PM
Re: Old computer/user accounts in an NT4 domain.
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
checkout my MachAcctPWage.exe for computer accounts.
You should know if a user is active or not. You can check password age of a use account as well, but test and service accounts that may not be required to change their password will cause you some issue.
{edit} Checkout ADSI for: lastLogon (Non-replicated) The lastLogon property specifies when the last logon occurred. This value is stored as a large integer that represents the number of seconds elapsed since 00:00:00, January 1, 1970. This property is maintained separately on each domain controller in the domain. A value of zero means that the last logon time is unknown. To get an accurate value for the user's last logon in the domain, each domain controller in the domain must be queried and the largest value should be used. [ 07. September 2002, 18:46: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#28556 - 2002-09-07 07:45 PM
Re: Old computer/user accounts in an NT4 domain.
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Glad you liked it. Let me know if find any of the other programs useful.
The BDC's should report the same results since machine accounts are replicated. The use of the \\BDC was to increase performance for those where the PDC was across a slow WAN link.
|
|
Top
|
|
|
|
#28558 - 2002-09-08 02:52 PM
Re: Old computer/user accounts in an NT4 domain.
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I could also do user accounts, but as I stated earlier the password policy is less consistent with user accounts. Some accounts may never be forced to change the password and would show a very old password age.
Since I wanted to create a utility that DELETED old accounts, I thought it wiser to exclude users because improperly deleting an active user is more problematic than deleting a computer account and I didn't want to contribute to causing problems. If you would find it helpful, the program could list users password ages but I would not want to delete based on that result.
|
|
Top
|
|
|
|
#28559 - 2002-09-08 03:21 PM
Re: Old computer/user accounts in an NT4 domain.
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
The best solution for user accounts would be to use the non-replicated lastLogon property and query all domain controllers. This would be a network intensive operation. Would you want to try that? I could incorporate that functionality in a couple days.
|
|
Top
|
|
|
|
#28561 - 2002-09-08 04:04 PM
Re: Old computer/user accounts in an NT4 domain.
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
|
|
Top
|
|
|
|
#28562 - 2002-09-08 11:30 PM
Re: Old computer/user accounts in an NT4 domain.
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Vig, I am currently testing a "LastLogon" program for user accounts. Since the LastLogin property has to be checked for each account on each domain controller this process is very network intensive and time consuming for large domains in a WAN environment.
I am considering a few short cuts to shorten the process. - Check the PW age from the PDC and make a list of only those accounts that fail some PW age test.
- Process this list of accounts on all other DCs instead of processing ALL accounts.
This way it might be possible to exclude the bulk of active accounts that are within the password age policy. Your thoughts? [ 08. September 2002, 23:31: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#28563 - 2002-09-09 04:57 AM
Re: Old computer/user accounts in an NT4 domain.
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Another issue that needs to be dealt with when looking at the LastLogin property is that an account can be used like "net use D: \\server\share password /user:domain\account" and not have been used to logon interactively via a logon dialog box since it was used for the inital process testing. When used in this fashion, the account is indeed active but the LastLogin property is not updated. So if there are no account policies forcing periodic password changes or the account never is required to change the password, the LastLogin property is of little value. [ 09. September 2002, 04:57: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#28565 - 2002-09-09 05:06 AM
Re: Old computer/user accounts in an NT4 domain.
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
I have been playing with Exchange mail box properties and security lately but have not seen any property that records a last accessed date.
|
|
Top
|
|
|
|
#28566 - 2002-09-09 05:14 AM
Re: Old computer/user accounts in an NT4 domain.
|
Vig
Starting to like KiXtart
Registered: 2001-11-14
Posts: 166
Loc: Saudi Arabia
|
I managed to find this Q article, but have not taken the time to (attempt to) port it to kixtart (if it's possible).
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q259570&
|
|
Top
|
|
|
|
#28568 - 2002-09-10 12:25 AM
Re: Old computer/user accounts in an NT4 domain.
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
NTDOC, I turned in at 11 PM eastern. My laptop and bbChecker II run almost 24x7. I would be happy to further discuss/develop this issue with you. Don't see any emails so far...
{edit} quote: Utility: LASTLOGON Written by: Howard A. Bullock (habullock@comcast.net)
Copyright 2002
LogFile = .\logs\LASTLOGON.log
2002.09.08_16.43.33 \\BDC005: Enumerating (1 of 12 DCs) 2002.09.08_17.04.16 \\BDC005: (18171 Accounts) Completed. 2002.09.08_17.04.16 \\BDC001: Enumerating (2 of 12 DCs) 2002.09.09_02.28.54 \\BDC001: (18171 Accounts) Completed. 2002.09.09_02.28.54 \\BDC003: Enumerating (3 of 12 DCs) 2002.09.09_06.47.06 \\BDC003: (18171 Accounts) Completed. 2002.09.09_06.47.06 \\BDC004: Enumerating (4 of 12 DCs) \\BDC004: 2160 accounts processed
[ 09. September 2002, 14:00: Message edited by: Howard Bullock ]
|
|
Top
|
|
|
|
#28569 - 2002-09-18 12:19 AM
Re: Old computer/user accounts in an NT4 domain.
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11628
Loc: CA
|
VIG and Howard,
Have either of you looked at the tools here? http://www.optimumx.com/Download/
They seem to have the tools to do the cleanup I had in mind. What do you guys think?
Howard, I sent you email to: hbullock@tycoelectronics.com
|
|
Top
|
|
|
|
#28570 - 2002-09-18 12:57 AM
Re: Old computer/user accounts in an NT4 domain.
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Replied to email. I would prefer to build my own tools like those at my web site. I can customize them to my heart's content.
|
|
Top
|
|
|
|
#28571 - 2002-09-18 01:11 AM
Re: Old computer/user accounts in an NT4 domain.
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
I have two ADSI scripts (written in KiX, of course) that I use to 'clean up' exipired workstations and user accounts.
CompAcctPswdAge() is my port of Howard's MachAcctPWAge Perl script. I usually run it to generate a list of machines with the password expired, and then go over it to make sure that there isn't anything in the list that shouldn't be there. For example, we have a couple of CD towers that, for some reason, show up expired on Howard's and my script.
I had another ADSI script on the board that checked user accounts maxpasswordage vs. their passwordage while also checking certain flags like 'DONTEXPIREPASSWD' and 'ACCOUNTDISABLED,' but I'll be danged if I can find it. I can repost it if you're interested.
|
|
Top
|
|
|
|
#28572 - 2002-09-18 01:32 AM
Re: Old computer/user accounts in an NT4 domain.
|
Howard Bullock
KiX Supporter
   
Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
|
Chris, if you had servers show up with 90 day old passwords that were still active, I would have to look closely at the situation. That doesn't make sense. Anyway Server and workstation computer account look the same from the SAM perspective.
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(mole)
and 1033 anonymous users online.
|
|
|