realized Posted May 25, 2006 Share Posted May 25, 2006 Is this possible? Change the LOCAL admin password automatically? I know I can "manage" another computer, but to do this to 30+ computers would not be cool.Is there any way I can run a script on my Active Directory workstations to change the local "administrator" passwords, add another account, disable accounts, etc.? Link to comment Share on other sites More sharing options...
Zartach Posted May 25, 2006 Share Posted May 25, 2006 You can try this one : http://www.windowsitpro.com/Articles/Index...playTab=ArticleIt is a batch script and it needs some reskit apps but it is usable, and it can also change the admin's accountname from what i have seen. Mind you i have not used tis myself yet but it seems to me like a usable thing that with some extra scripting and schaduling can do regular password changes. Link to comment Share on other sites More sharing options...
Interface Posted May 28, 2006 Share Posted May 28, 2006 Hi,I don't Understand Automatic......But this is my way...... not 30+ but 1K++++Again save as WhatEverYouLike.vbs and 2click..Then you will see a COMPUTERS.txt File genarated "Automatically" put the computer name inside and 2 click.You can challange the script to do automatic using counters,,and loops etc try... or let me know...But don't forget the "ChangePwdComputers.log"'********************************************************************'*'* File: ADMLpass.vbs'* Created: September 2005'* Version: 2k509.21'*'* ' Sample Script For Changing The Local Administrator Account Password. '*'* Main Function: To Change The Local Administrator Account Password. '*'* Syntax Computername'*'* Copyright (C) 2005 Nidheesh Nattiala'*'********************************************************************' Description: This script will read in a list of computer account names' from a file (created manually or by exporting a list from an' OU/container using ADU&C). Each computer name must be the' first item on each line of the file; anything after the' computer name will be ignored. The script will attempt to' change the local Administrator account password for each' computer. Note: The first line of the input file is' assumed to be a header line. By NNattiala'-------------------------------------------------------------------------------'-------------------------------------------------------------------------------' Initialization - Declare variables'-------------------------------------------------------------------------------Dim fsoIn, fsoOutDim inFile, outFileDim arrComputerNamesDim objUserDim strComputerDim newPasswordDim ErrorOccurredConst ForReading = 1Const ForWriting = 2Const ForAppending = 8Const inFilename = "Computers.txt"Const outFilename = "ChangePwdComputers.log"'-------------------------------------------------------------------------------' Main script'-------------------------------------------------------------------------------On Error Resume NextErrorOccurred = False' Insert WARNING here...Msgbox ("WARNING: This script will change the local administrator password for every " & _ "computer listed in COMPUTERS.TXT. If any services are running with the local " & _ "administrator credentials, those services must be updated, or they won't " & _ "start on the next boot. For this script to work, you must have administrative " & _ "privileges on all of the remote computers you are changing the password for.")' Get new passwordnewPassword = Inputbox ("Please Enter The New Password For The Local Administrators: Take Care Created By NNattiala","Enter The New Password","N!dh55sh")' Open the input file and skip the header lineSet fsoIn = CreateObject("scripting.filesystemobject")Set inFile = fsoIn.OpenTextFile(inFilename, ForReading, True)inFile.Skipline' Open the log file (append mode) and timestamp the entrySet fsoOut = CreateObject("scripting.filesystemobject")Set outFile = fsoOut.OpenTextFile(outFilename, ForAppending, True)outFile.writeline (Now & vbTab & "Starting script...")While Not inFile.AtEndOfStream arrComputerNames = Split(inFile.Readline, vbTab, -1, 1) ' arrComputerNames(0) contains the computer name strComputer = arrComputerNames(0) ' Connect to the computer\administrator account Set objUser = GetObject("WinNT://" & strComputer & "/Administrator, user") If Err.Number <> 0 Then outFile.writeline Now & vbTab & "Error connecting to " & strComputer & " --- " & Err.Description Err.Clear ErrorOccurred = True Else ' Set the password for the account objUser.SetPassword newPassword objUser.SetInfo If Err.Number <> 0 Then outFile.writeline Now & vbTab & "Error setting password for " & strComputer & _ "\Administrator" & " --- " & Err.Description Err.Clear ErrorOccurred = True Else outFile.writeline (Now & vbTab & "Password set for " & strComputer & "\Administrator") End If End IfWend' Clean up the environmentoutFile.writeline (Now & vbTab & "Ending script...")inFile.closeoutFile.closeIf ErrorOccurred Then msgbox "Script completed with errors. Please check the log file."Else MsgBox "Script completed successfully."End IfBelive The Force.... Link to comment Share on other sites More sharing options...
XP_2600 Posted May 28, 2006 Share Posted May 28, 2006 You can enable telnet in the other machines, and connect to them via telnet then you can use net user command. Link to comment Share on other sites More sharing options...
allen2 Posted May 28, 2006 Share Posted May 28, 2006 You can also use a batch script via a domain policy if your 30+ comp are in the same domain or do it via psexec for sysinternals (able to run a command on a remote comp). Link to comment Share on other sites More sharing options...
Zartach Posted May 28, 2006 Share Posted May 28, 2006 Hi,I don't Understand Automatic......But this is my way...... not 30+ but 1K++++Again save as WhatEverYouLike.vbs and 2click..Then you will see a COMPUTERS.txt File genarated "Automatically" put the computer name inside and 2 click.You can challange the script to do automatic using counters,,and loops etc try... or let me know...But don't forget the "ChangePwdComputers.log"*snip*Cool, nice script, its a better way than the batch i found. I like the input of the computernames in the txt file that way you can use a selective export to change the pwd on.Thanks for the script great stuff. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now