如果命令在 Windows Server 2008 上运行,可能的原因是什么?看来此帐户是此框的管理员。我也以管理员身份运行 Windows 命令行。
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.
对于解决此类错误有哪些建议?
编辑 @ 2013 年 3 月 8 日上午 11:16:
================================================ ======================
这昨晚没用:
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.
================================================ ======================
等了 30 分钟,然后就成功了(没有域):
C:>net use z: \\uwhc-sas2\SASHIMC /USER:SVCdatamgmt thepassword
The command completed successfully.
C:>net use z: /delete
z: was deleted successfully.
================================================ ======================
这也适用(与域):
C:>net use z: \\uwhc-sas2\SASHIMC /USER:UWHIS\SVCdatamgmt thepassword
The command completed successfully.
================================================ ======================
但这不起作用(使用完全限定的域名):
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 代码。我的证书有效(并且一直有效);SVCdatamgmt 凭据不起作用。
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);
}
让我们一点一点地进行:
该帐户很可能是第一次在 AD 中被锁定。大多数锁定策略仅将帐户锁定 15-30 分钟以阻止暴力破解。您一定是输错了几次密码,或者在其他地方使用该帐户登录失败导致了这种情况。当您在 30 分钟后尝试时,该帐户会自动解锁,很可能是根据您的帐户锁定政策。有关详细信息,请参阅您的默认域策略。
某处某处锁定了此帐户(请参阅您的域控制器日志)。然后它在指定的锁定间隔后解锁,您可以正常使用它。看来这里没有实际问题。