I was looking for a utility that would do the same thing a while back... but came up empty handed. If you find one that does the job... send me a PM just in case I forget to check back with this thread.
I'd appreciate it!
Disable user from command prompt that would be useful in a script... but couldn't find the right tools to make my script.
w00t! w00t! Found a way to find out the last user logons... now to make a script.
http://www.windows2000faq.com/Articl...rticleID=15113
Code:
' List last logon times
' 2001-03-27 John Savill, Jakob Hussfelt http://www.ntfaq.com
On Error Resume Next
sEnterDCs = "SAVILLTECH,SAVILLNT02"
sObjects = Split(sEnterDCs, ",")
Set oDomain = GetObject("WinNT://" & sObjects(0))
oDomain.Filter = Array("User")
WScript.Echo "Showing last login times of accounts from: " & oDomain.Name & vbNewLine
For Each oDomainItem In oDomain
sUsrLogin = oDomainItem.LastLogin
If UBound(sObjects) >= 1 Then
For ii = 1 To UBound(sObjects)
Set oUsr = GetObject("WinNT://" & sObjects(ii) & "/" & oDomainItem.Name & ",user")
If oUsr.LastLogin > sUsrLogin Then sUsrLogin = oUsr.LastLogin
Next
End If
WScript.Echo "Username: " & Left(oDomainItem.Name & Space(22),22) & "Last login: " & FormatDateTime(sUsrLogin)
Next
Just make sure to change the
sEnterDCs = "SAVILLTECH,SAVILLNT02"
to reflect the correct machine names or domain name.
I'm off to toy with this a bit more.
Turns out that you can use "usrstat.exe" from the resource kit to do something similar...
AhHA! Found a script that finds and offers to disable inactive users... no need to write one now. Check it out here.
Novell's list of users and account logons...
Check out these novell user mgt utilities too... not sure what version of novell you're using though.