系统相关
首页 > 系统相关> > java验证windows账号密码

java验证windows账号密码

作者:互联网

<dependency>
   <groupId>jcifs</groupId>
   <artifactId>jcifs</artifactId>
   <version>1.3.17</version>
</dependency>
UniAddress thisAddress = UniAddress.getByName("10.19.170.147"); //host为IP地址或服务器名称,String
NtlmPasswordAuthentication thisAuth = new NtlmPasswordAuthentication(System.getenv().get("USERDOMAIN"), "administrator","hij123+");
SmbSession.logon(thisAddress, thisAuth);//账号或密码错误会抛异常

标签:jcifs,java,NtlmPasswordAuthentication,1.3,windows,thisAuth,thisAddress,UniAddres
来源: https://blog.csdn.net/chg2018_csdn/article/details/89386092