I have something for you. I wrote a channel that changes the local administrator’s password on our endpoints. It uses the techniques discussed in the ‘File to be overwritten’ discussion on this forum. http://communities.bmc.com/communities/message/94138#94138
We use a tuner property ending in ‘.password’ and AutoIt to scramble the password. We send the tuner property to the endpoints via policy along with a ‘hint’ that is recorded into the environmental variables so that the information can be recorded by inventory. Example: Hint – state; Password – M1ch1g@n.
I’ll scrub out any sensitive information from the channel then I’ll post the channel source in the forum. I should have it up later today, and it usually take the moderators a day or two to approve the file upload.
I have uploaded the channel. It is waiting for approval. I'll update this post with a link if/when the approval happens.
Many Thanks, Jason. I look forward to seeing this!
Thanks for sending the files through to me previously, Jason. I have managed to make one potentially useful change, which is to remove the need for the external VBS file for the password reset by using AutoIt's COM support. I made a load of other less useful changes to tailor it to the environment, so when I get some time I'll see if I can extract just the password reset change.
Btw, which versions of Marimba have you tested this with?
7.1 & 7.2
Here's the code for the change I mentioned. It has been rather forcibly extracted from a heavily updated version of the script, so hopefully it has survived intact. Simply replace everything in the original script between the first and last lines shown:
$NewHint = $CMDLine ; Set up COM error handler Global $oComError = ObjEvent("AutoIt.Error", "_ComErrFunc") ; Create COM object for the user for which we want to reset the password Local $oLocalAdmin = ObjGet("WinNT://" & @ComputerName & "/administrator") ConsoleWrite("Setting PW" & @crlf) $oLocalAdmin.SetPassword($NewPassword) If @error Then ConsoleWrite("An error occurred setting the password: " & hex(@error, 8) & @CRLF) Exit -1 Else ConsoleWrite("Password set successfully." & @CRLF) EndIf ConsoleWrite("Setting hint to '" & $NewHint & "'" & @crlf)
And then at the end of the script, add the error handler function:
Func _ComErrFunc() Local $HexNumber = Hex($oComError.number, 8) ConsoleWrite("Error Number: " & $HexNumber & @CRLF) ConsoleWrite("Line Number: " & $oComError.scriptline & @CRLF) ConsoleWrite("Description: " & $oComError.description & @CRLF) ConsoleWrite("WinDescription: " & $oComError.windescription & @CRLF) SetError(1) EndFunc
I'm hoping my understanding of the forum's code-handling is right so that the above doesn't get mangled...
Could you please provide the source and docs again as the link is throwing error "The requested resource (/docs/DOC-6584) is not available."
My email address firstname.lastname@example.org
The link is fixed in the thread. Let me know if you have questions about the channel.
The link worked for me.