planning to read a file over a Windows from Ubuntu in Java using jcifs.Tried a simple approach using:
String user = "mydomain;myuser:mypassword";
NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication(user);
SmbFile remotefile = new SmbFile("smb://myserver/myfolder/myfile.jar",auth);
Knowing that the server works and the login values are correct,all i get is a logon failure,what could be the problem here?
Not sure if you got this to work.
But after much pain and anguish, I figured the NtlmPasswordAuthentication
call must include the domain.
So if you're using the code @user717630 posted, you'll just have to change the NtlmPasswordAuthentication
call to:
NtlmPasswordAuthentication auth = new NtlmPasswordAuthentication("mydomain",user, pass);