mysql netbios_纯文本密码被禁用NetBios远程连接(Plain text passwords are disabled NetBios remote connection)...

在尝试通过Java代码使用NetBios从远程Windows机器上获取文件时,遇到'Plain text passwords are disabled'异常。已尝试设置jcifs.smb.client.disablePlainTextPasswords属性为true,但未生效。寻找不依赖于禁用第三方SMB服务器的解决方案。
摘要由CSDN通过智能技术生成

I'm trying connect remotely to windows machine and fetch files from this machine. this is my code,

path = path.replace(":","");

path = path.replace("\\","/");

String smbpath="smb://"+host+":445/"+path; //c/alon2.txt";

NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication(user+":"+password);

SmbFile smbFile = new SmbFile(smbpath,auth);

SmbFileInputStream input = new SmbFileInputStream(smbFile);

Files.copy(input, destPath.toPath());

System.out.println("completed fetching file");

return destPath;

and I got this exception, "Plain text passwords are disabled", i tried to put jcifs.Config.setProperty("jcifs.smb.client.disablePlainTextPasswords","true"); and it doesnt work, and i dont want to disable the smb 3rd party in

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值