第一次碰到,记录一下,以备不时之需。
UniAddress thisAddress = UniAddress.getByName(host); //host为IP地址或服务器名称,String
NtlmPasswordAuthentication thisAuth = new NtlmPasswordAuthentication(domain, userID,
password);//domain 为windows 的域
SmbSession.logon(thisAddress, thisAuth);//验证成功返回true
本文记录了使用UniAddress和NtlmPasswordAuthentication进行SMB会话认证的过程,包括通过主机名获取地址、设置Windows域认证及成功验证的返回值。
884

被折叠的 条评论
为什么被折叠?



