Jump to content

brightjdb

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by brightjdb

  1. brightjdb

    email problems

    Are the Users that are having trouble using a VPN?
  2. This script is a great script for Public access computer that need to abide by CALEA laws. Basicly it is a Password of the day script. It will generate a password reset a specified user to that password and email a group or individual "The password of the Day" You either must run this on a system that has rights to change passwords or run with an account that does. Use task scheduler to run this at whatever time you would like. ================================================ ================================================ Option Explicit Dim objUser, objEmail Dim strPassword Dim intAccValue, strPwd1, strPwd2, strPwd3, StrPW 'Generate Password strPwd1 = GeneratePassword("ABCDEFGHJKLMNPQRSTUVWXYZ", 3) strPwd2 = GeneratePassword("abcdefghijkmnpqrstuvwxyz", 4) strPwd3 = GeneratePassword("123456789", 1) Function GeneratePassword(strCharacters, intLength) Randomize Dim strS, intI For intI = 1 To intLength strS = strS + Mid(strCharacters, Int(Rnd() * Len(strCharacters))+1, 1) Next GeneratePassword=strS End Function StrPW = strPwd1 & strPwd2 & strPwd3 'Set account to Reset Set objUser = GetObject("LDAP://CN=USER,OU=USERS,DC=YOUR,DC=Domain") 'Set Account Attributes intAccValue = 544 objUser.SetPassword(StrPW) objUser.SetInfo objUser.Put "userAccountControl", intAccValue objUser.SetInfo 'Send email Settings are configured for NON-SMTP service computer Set objEmail = CreateObject("CDO.Message") objEmail.From = "[email protected]" objEmail.To = "[email protected]" objEmail.Subject = "Password of the Day" objEmail.Textbody = "Todays password is " &StrPW&". " objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = _ "smtp.wcu.edu" objEmail.Configuration.Fields.Item _ ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 objEmail.Configuration.Fields.Update objEmail.Send ===================================================== =====================================================
×
×
  • Create New...