Hey Steve,
Sometimes its easier to do things using batch files then coding it in PERL.
The below are two batch files that will establish a connection to a remote
machine using the 'Net Use' command and alternate credentials, and then run
a PERL script if it is successful. One batch file subs out the other for
convenience.
Hope This Helps.
James Krummel
REM ##START OF CALLER.CMD##
CALL PARSE.CMD computer password
CALL PARSE.CMD NT_LAB1 SeCuRe123
CALL PARSE.CMD ROOM403 GoBears
CALL PARSE.CMD HOUSTON drowssap
Rem .. Ad Infinatim
REM ##END OF CALLER.CMD##
REM ##START OF PARSE.CMD##
NET USE \\%1 /DELETE
NET USE \\%1\IPC$ /USER:%1\Administrator %2 | FIND /I "The command completed
successfully."
IF %ERRORLEVEL% NEQ 0 GOTO PROBLEM
GOTO CONECTED
:CONECTED
PERL AdminScript.pl
NET USE \\%1 /DELETE
GOTO FINIT
:PROBLEM
ECHO %1 %2 >> ErrorLog.txt
GOTO FINIT
:FINIT
REM ##END OF PARSE.CMD##
>----- Original Message -----
>From: "Steve Nolan" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>Sent: Friday, December 01, 2000 11:56 AM
>Subject: Remote admin with multiple passwords?
>
>
>Hi, all.
>
>I realize this is a question that deals more with my lack of understanding
of NT
>than with any specifics of perl, but I'm having no luck finding an answer
>elsewhere so perhaps someone here could take pity and bump my clue level up
a
>notch:
>
>I have a number of NT4 standalone (not domain members) workstations that I
want
>to be able to perform remote administration on from my own workstation.
The
>problem is that there are some 300 workstations in almost 40 different
>geographic locations, with a different machine Administrator password at
each
>site.
>
>The scripts I've seen thus far all seem to assume that the executor of the
>script has domain admin privileges (not applicable in this environment) or
a
>shared password with the boxes being administered. So, when I run a script
>against a machine where this is not the case, I either get a failure, or in
some
>cases a GUI Win32 dialog prompting me for a username/password pair. This
rather
>defeats the purpose of the scripting. ;-)
>
>Given that I can't change the authentication model (it's there to stay,
just the
>way it is) is there any way I can programmatically connect to the remote
>machines with the administrator password appropriate to each site? (And
yes, I
>fully understand that leaving passwords in plaintext in scripts is a
profoundly
>bad idea. If it looks necessary the script can be encrypted and a key
provided
>at runtime .. Entering one password is not an inconvenience. Entering
forty
>is.) Any suggestions? Pointers? Fine Manuals that I could Read?
_______________________________________________
Perl-Win32-Admin mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-admin