Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Logging logon attempts

Status
Not open for further replies.

tbalazs

IS-IT--Management
Dec 18, 2000
158
GB
Win2k server (domain controller) XP pro workstations.
What is the simplest way to log logon attempt events to one particular workstation? Logons would probably be as administrator. Could local logon attempts be logged as well, or only logons to the domain?
Thanks,
Tony.
 
Here is some poor man's logging that I use. VB script that I call from my login script.

Code:
On error resume next
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objNetwork = CreateObject("WScript.Network")
strPCName = objNetwork.Computername
user = objNetwork.UserName

Set oshell = CreateObject("wscript.shell")
strWinDir = oShell.ExpandEnvironmentStrings("%SYSTEMROOT%")

varDate = Month(Date()) & "-" & Day(Date()) & "-" & Year(Date())
Set objText = objFSO.OpenTextFile(strWinDir & "\Auditing.txt", 8, True, 0)
ObjText.WriteLine("Logon" & vbtab & varDate & vbtab & time & vbtab & User & vbtab & vbtab & strPCName)
ObjText.Close
Set objText = nothing
Set oshell = nothing
Set objNetwork = nothing
Set objFSO = nothing

wscript.quit

FRCP
(my side business)
 
You can log local attempts, just set up auditing on each of the servers you want to monitor. It will log the info in the local security log.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top