mtucker6784
IS-IT--Management
Hi everyone, I work in the educational industry and we receive a lot of work orders asking for password resets. I've been working on my own html vbscript that will reset a designated user on My local machine (I'm testing as much as I can locally so I don't threaten compromising our AD system.) I created a user named "test" which I'm trying to manipulate. The problem is: It doesn't seem to successfully use GetObject to get the username from my computer. I do see my "[DEBUG] Attempting to find user" message, but nothing after that.
Here is the script I'm trying to use
<HTML>
<BODY>
<TITLE>x Password Change 0.1</TITLE>
<script language="VBScript">
dim variable , user
user = InputBox("Username?")
password = InputBox("Password?")
document.write("[DEBUG] Attempting to find " &user)
Set objUser = GetObject("WinNT://machine-name/ " &user)
document.write("[DEBUG] found user: " &user)
objUser.SetPassword " " &password
document.write("AJUSD Password change successful for user: " &user)
document.write("<br>")
document.write("Password was set to: " &password)
</script>
<a href=" here to go back to the ticket page</a>
</HTML>
I've tried taking out the &user variable after my GetObject command, just and just using: Set objUser = GetObject("WinNT://machine-name/test") but that doesn't work either
I know someone may laugh at me, but it's an honest attempt Any point in the right direction would be much appreciated! Thank you so much!
-MT
Here is the script I'm trying to use
<HTML>
<BODY>
<TITLE>x Password Change 0.1</TITLE>
<script language="VBScript">
dim variable , user
user = InputBox("Username?")
password = InputBox("Password?")
document.write("[DEBUG] Attempting to find " &user)
Set objUser = GetObject("WinNT://machine-name/ " &user)
document.write("[DEBUG] found user: " &user)
objUser.SetPassword " " &password
document.write("AJUSD Password change successful for user: " &user)
document.write("<br>")
document.write("Password was set to: " &password)
</script>
<a href=" here to go back to the ticket page</a>
</HTML>
I've tried taking out the &user variable after my GetObject command, just and just using: Set objUser = GetObject("WinNT://machine-name/test") but that doesn't work either
I know someone may laugh at me, but it's an honest attempt Any point in the right direction would be much appreciated! Thank you so much!
-MT