In the Win32::NetAdmin module i am going to use the UserSetAttributes to change the administrator password, however...there is alot of other fields that i do not wish to use...example the man page shows
UserSetAttributes(server, username, password, passwordAge,privilege,homeDir, comment, flags, scriptPath).
I only need to use the first 3. is there a way to specify that or do i have to assign values to the rest of them.
Any help would be appreciated.
Ray
# Ray Espinoza
# ChPass.pl
# TO change local admin pass on remote machine
####################################################
#!D:\perl\bin -w
use strict;
use Win32::NetAdmin qw(SetUserAttributes);
chomp(my $server = <STDIN>);
my $userAcct = "Administrator";
my $Pass = "387SetHike";
UserSetAttributes($server, $userAcct, $Pass) ||
die "UserSetAttributes() failed: $^E";
I get this error when i try to run this:
"SetUserAttributes" is not exported by the Win32::NetAdmin module at C
+:\
perl\ChPass.pl line 9
Can't continue after import errors at C:\scripts\perl\ChPass.pl line 9
BEGIN failed--compilation aborted at C:\scripts\perl\ChPass.pl line 9.