notify when a administrator is loggin
Hi, Let me know if there somehow, that when is loggina domain administrator on a PC or server, it sends an alarm to notify a user that logging. It is possible? Windows 2003 SP2 domain
December 12th, 2008 9:33pm
You can create a logon script that runs only for the administrator accounts you want. Just create an OU for the administrators and attach the script below to send an e-mail alert to the uses. Make sure that you modify with the smtp server, from address, and to address.
'Vbscript starts herestrSmartHost ="smtp.servername"'sets the name of the SMTP relay serverstrSMTPPort = "25" 'sets the port used for SMTP trafficstrFromAddr =alerts@domain.com 'sets the address alarm e-mails are sent fromstrToAddr =alertreceiving@domain.com 'sets the address alarm e-mails are sent toSET objEmail = CreateObject("CDO.Message")
strSubject = "THIS IS THE MESSAGE HEADER"strTextBody ="THIS IS THE MESSAGE THEY RECEIVE" Call SendEmail(strFromAddr,strToAddr,strSubject, strTextBody)
SUB SendEmail(varFrom, varTO, varSubject, varTextBody)objEmail.From = varFromobjEmail.To = varToobjEmail.Subject = varSubjectobjEmail.TextBody = varTextBodyobjEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2objEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = strSmartHostobjEmail.Configuration.Fields.Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = strSMTPPortobjEmail.Configuration.Fields.UpdateobjEmail.SendEND SUB
Free Windows Admin Tool Kit Click here and download it now
December 12th, 2008 11:49pm
Hi,But, you need authentication on the server to send email no?.
December 13th, 2008 4:31pm
It should only be restrictive if you are relaying to a different domain than the e-mail server is authoritative for. So if your e-mail server accepts emails from domain.com you can send to anyone with the address of @domain.com. But it will fail if you try to send to @otherdomain.com.
Free Windows Admin Tool Kit Click here and download it now
December 13th, 2008 4:40pm
In theory you should send my domain, but as I have pasted the code, cambiaod data and not send it to me, that's why it said .. As I can ascertain. Thank you
December 13th, 2008 5:57pm
OK, I get e-mail, but you can modify the script to know that computer or server has logged?
Free Windows Admin Tool Kit Click here and download it now
December 13th, 2008 6:08pm
You can append the email subject with the hostname of the local computer:strSubject = "THIS IS THE MESSAGE HEADER"Set objNetwork = WScript.CreateObject("WScript.Network")strComputerName = objNetwork.ComputerNamestrSubject = strSubject & " : " & strComputerNameRegards,Salvador Manaois IIIMCITP | Server/Enterprise AdministratorMCSE MCSA MCTS C|EH CIWABytes & Badz: http://badzmanaois.blogspot.com
December 15th, 2008 5:54am
Ok, thank you very much. You could find the time to login?
Free Windows Admin Tool Kit Click here and download it now
December 15th, 2008 3:40pm
You can use the Now function. In the following example, the time of login is appended to the strSubject variable:strSubject = "THIS IS THE MESSAGE HEADER"Set objNetwork = WScript.CreateObject("WScript.Network")strComputerName = objNetwork.ComputerNamestrSubject = strSubject & " : " & strComputerName & " on " & NowRegards,Salvador Manaois IIIMCITP | Server/Enterprise AdministratorMCSE MCSA MCTS C|EH CIWABytes & Badz: http://badzmanaois.blogspot.com
December 15th, 2008 7:21pm
you could post a general 'advertisement' on the webHHTP of the domain that authoritive users are logged for security reasons....Just an idea .. Information is the most valuable commodity I know off.
Free Windows Admin Tool Kit Click here and download it now
December 18th, 2008 3:15am


