in reply to Remote Win32 User Authentication

I will not throw code out because I do not use anything other than dropping a command line 'net use' statement in my scripts like you do.

You asked if using 'net use' was untidy. For people that know and understand the Win32::AdminMisc module at better than an intermediate level then untidy may be a correct word. For myself, I use the Win32::AdminMisc module for a few things, but not to login. I didn't want to have to research all of the error codes and deal with those when writing my code. I set my code that logs into workstations and servers to look for the success message that comes up when authenticated. If anything else pops up, that message is popped up on the screen in either a gui pop-up box, in the command window, or in a logfile (all depending on which OS I am scripting from, etc.).

The other portion of your post I will try and give a hand with relates to logging into a remote workstation/server. The command line option that you pass the username with has a couple of ways it can be sent. Sending it like '/username:username' first checks the local machine you are running the script from for a matching username to send across. If a match is found, the credentials of that local account are sent across (domain name membership, unique identifying number from the SAM database, and password from the account the script is running under if no password is specified on the command line).

The other piece you can add to it is '/username:domain\username'. This will specify an account belonging to the domain you specify. If no such user is found in that domain, an error will tell you so. If a password is not specified, it will send the one used by the account the script is running under.

To use a local workstation account to authenticate, replace the domain bit from the last example with the worstation name as shown: '/username:workstation name\username'. Password passing falls under the same rules as above.

I sure hope this helps. I can hold my own against most anyone with administration and real management of Win32 systems, but I am not quite the expert on making perl run perfectly on them. If you need more help, or if I am just way off base in what you are asking, then reply and I will do my best.

-TV