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!

Script to change NT password? need your help

Status
Not open for further replies.

Sina

Technical User
Jan 2, 2001
309
0
0
CA
Hi everyone,

how do you change the NT domain password for a user?

use Win32::AdminMisc;
if (Win32::AdminMisc::UserChangePassword("domainname",
"user1",
"oldpassword",
"newpassword")){
print "Password successfully changed\n";
}else{
print "Password failed to change.\n";
}

I tried the above but I just keep getting the password can not be changed.

thanks
 
maybe you don't have sufficient priveledges to change passwords. luciddream@subdimension.com
 
Yes, I'm logged in as admin.
 
i think maybe you want to use

Win32::AdminMics::SetPassword("domainname", "user1", "newpassword");

luciddream@subdimension.com
 
I tried that also, but still the same problem.

The scripts are mentioned in Win32 perl (by Roth) but I don't know why it does not work.

Also do you know of any way to change the windows resolution using perl?

Thank you
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top