What is the likely cause of this, if the command is run on Windows Server 2008? It appears that this account is an administrator on this box. I'm running the Windows command line as an administrator also.
C:\>net use z: \\uwhc-sas2\SASHIMC /USER:SVCdatamgmt thepassword
System error 1909 has occurred.
The referenced account is currently locked out and may not be logged on to.
What are some suggestions for troubleshooting such an error?
EDIT @ 11:16AM 3/8/2013:
========================================================================
This didn’t work last night:
C:>net use z: \\uwhc-sas2\SASHIMC /USER:SVCdatamgmt thepassword
System error 1909 has occurred.
The referenced account is currently locked out and may not be logged on to.
========================================================================
Waited 30 minutes and then this worked (without domain):
C:>net use z: \\uwhc-sas2\SASHIMC /USER:SVCdatamgmt thepassword
The command completed successfully.
C:>net use z: /delete
z: was deleted successfully.
========================================================================
This also works (with domain):
C:>net use z: \\uwhc-sas2\SASHIMC /USER:UWHIS\SVCdatamgmt thepassword
The command completed successfully.
========================================================================
But this doesn’t work (with fully qualified domain name):
C:>net use z: \\uwhc-sas2\SASHIMC /USER:uwhc-sas2.uwhis.hosp.wisc.edu\SVCdatamgmt thepassword
System error 86 has occurred.
The specified network password is not correct.
========================================================================
.NET code that maps drive. My credentials work (and have always worked); SVCdatamgmt credentials do not work.
public static void MapNetworkDriveToUNC()
{
var command = @"net use " + mapDrive + " " + uncPath + " " + uncUser + " " + uncPass;
ExecuteCommand(command, 10000);
}
public static void UnmapNetworkDriveToUNC()
{
var command = "net use " + mapDrive + " /delete";
ExecuteCommand(command, 5000);
}
Let's step through this bit by bit:
The account was likely locked in AD the first time. Most lockout policies only lock an account for 15-30 minutes to stop brute-forces. You must have mistyped the password a couple of times or had failed logins with that account elsewhere to cause this. When you tried 30 minutes later, the account was automatically unlocked, most likely per your account lockout policy. Consult your Default Domain Policy for more details.
Something somewhere locked this account (consult your Domain Controller logs). Then it unlocked after the specified lockout interval and you could use it as normal. It doesn't appear that there's an actual problem here.