1

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);
}
MadHatter
  • 78,442
  • 20
  • 178
  • 229
MacGyver
  • 1,864
  • 7
  • 37
  • 50
  • A minor note: the syntax of `UWHIS\SVCdatamgmt` is using the NetBIOS name of the domain. If you want to use a FQDN the syntax is `SVCdatamgmt@uwhc-sas2.uwhis.hosp.wisc.edu`. – mprill Mar 08 '13 at 18:15

1 Answers1

3

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.

MDMarra
  • 100,183
  • 32
  • 195
  • 326
  • That explains the 1909 error nicely, so thank you for the explanation. If you'd like to see the actual issue, look in Stack Overflow here, http://stackoverflow.com/questions/15300093/unc-path-can-be-mapped-from-command-line-but-not-from-net-console-application – MacGyver Mar 08 '13 at 20:18