Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resetting local admin passwords

Status
Not open for further replies.

JazzFan

Technical User
Apr 8, 2003
18
0
0
US
Is there a way to change the administrator's password on about 100 pcs running Windows NT 4? . I've tried putting the line "cmd /c net user administrator 74735jdhsg" in a file and then running the file with a vbs script but I get a "General Access Denied" error.
Any help is very much appreciated.
JazzFan
 
This will change the password on remote pc's. you can use either a ip address or a computer name for userdomain

userdomain = "999.999.999.999"
newuser = "USERNAME"
newpassword = "Newpass"
on error resume next
Set User = GetObject("WinNT://"& userdomain &"/"& newuser_
&"")
if err.number = "-2147022676" then
msgbox "user doesn't exist"
else
User.SetPassword(NewPassword)
MSGBOX "DONE"
end if
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top