如果命令在Windows Server 2008上运行,可能的原因是什么? 看起来这个账户是这个盒子的pipe理员。 我也以pipe理员身份运行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.
有什么build议来解决这样的错误?
================================================== ======================
这昨晚没有工作:
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); }
我们一步一步来解释一下:
该帐户可能首次locking在AD中。 大多数locking政策只locking一个帐户15-30分钟,以阻止暴力。 您必须错误地键入了密码几次,或者在其他地方用该帐户login失败才导致此问题。 当您在30分钟后尝试时,帐户会自动解锁,很可能是您的帐户locking政策。 请参阅您的默认域策略了解更多详情。
某处locking了此帐户(请参阅您的域控制器日志)。 然后在指定的locking时间间隔后解锁,您可以正常使用它。 这里并没有出现实际的问题。