Re: audit administrator login

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hello erez,

Found this script in another posting for the services, other way is to login to any machine and check the services.msc by hand:

You could use this script and put it into a batch file with a list of your computer names passed as the for-next loop.

START OF SCRIPT:

Const ForAppending = 8
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objLogFile = objFSO.OpenTextFile("c:\scripts\service_list.csv", _ ForAppending, True)
objLogFile.Write _
("System Name,Service Name,Service Type,Service State, Exit " _ & "Code,Process ID,Can Be Paused,Can Be Stopped,Caption," _ & "Description,Can Interact with Desktop,Display Name,Error " _
& "Control, Executable Path Name,Service Started," _ & "Start Mode,Account Name ") objLogFile.Writeline
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colListOfServices = objWMIService.ExecQuery _
("Select * from Win32_Service")
For Each objService in colListOfServices
objLogFile.Write(objService.SystemName) & "," objLogFile.Write(objService.Name) & "," objLogFile.Write(objService.ServiceType) & "," objLogFile.Write(objService.State) & "," objLogFile.Write(objService.ExitCode) & "," objLogFile.Write(objService.ProcessID) & "," objLogFile.Write(objService.AcceptPause) & "," objLogFile.Write(objService.AcceptStop) & "," objLogFile.Write(objService.Caption) & "," objLogFile.Write(objService.Description) & "," objLogFile.Write(objService.DesktopInteract) & "," objLogFile.Write(objService.DisplayName) & "," objLogFile.Write(objService.ErrorControl) & "," objLogFile.Write(objService.PathName) & "," objLogFile.Write(objService.Started) & "," objLogFile.Write(objService.StartMode) & "," objLogFile.Write(objService.StartName) & "," objLogFile.writeline
Next

END OF SCRIPT:

Best regards

Meinolf Weber
Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights.
** Please do NOT email, only reply to Newsgroups
** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm

Hi all,

what is the best way to audit domain administrator logins ,
interactive or service logins?

i need to change the pass and i'm afraid that many service which run
with that cerdintials will fail.

Erez



.



Relevant Pages

  • Re: writting to already connected database
    ... Logins.....that would confuse you and probably the script as well. ... username and password submited by a form exsist and that they match. ... script verifies that the username and password match have it write those values ... to is "logins" and the name of the column inside the table is "Logins". ...
    (microsoft.public.frontpage.client)
  • Re: aix shell script
    ... > I need a shell script to stop duplicate concurrent logins. ... auth1 = SYSTEM,auth_method ... "root" should be set as an exception to this rule: ...
    (comp.unix.aix)
  • Re: aix shell script
    ... timed log out: ... there is a timed-logout variable for the shell. ... >>I need a shell script to stop duplicate concurrent logins. ...
    (comp.unix.aix)
  • Re: how to migrate users/logins with different domain account
    ... One option is to change domains for the logins using ... sp_revlogin created a script fine. ... 'olddomain' with 'newdomain' is out of the question. ...
    (microsoft.public.sqlserver.security)
  • Re: audit administrator login
    ... Found this script in another posting for the services, other way is to login ... Set colListOfServices = objWMIService.ExecQuery _ ...
    (microsoft.public.windows.server.active_directory)