如果该命令在 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:
========================================================================
昨晚这不起作用:
联系人:>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 分钟然后就可以了(无需域名):
联系人:>net use z: \\uwhc-sas2\SASHIMC /USER:SVCdatamgmt thepassword
The command completed successfully.
联系人:>net use z: /delete
z: was deleted successfully.
========================================================================
这也有效(对于域):
联系人:>net use z: \\uwhc-sas2\SASHIMC /USER:UWHIS\SVCdatamgmt thepassword
The command completed successfully.
========================================================================
但这不起作用(具有完全合格的域名):
联系人:>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);
}
答案1
让我们一步一步地来看一下:
该帐户很可能在第一次登录 AD 时被锁定。大多数锁定策略仅将帐户锁定 15-30 分钟以阻止暴力破解。您必须输错几次密码或在其他地方使用该帐户登录失败才会造成这种情况。当您在 30 分钟后尝试登录时,该帐户会自动解锁,这很可能是按照您的帐户锁定策略进行的。有关更多详细信息,请参阅您的默认域策略。
某个地方的某个东西锁定了此帐户(请查阅您的域控制器日志)。然后在指定的锁定间隔后解锁,您可以正常使用它。这里似乎没有实际问题。