Comments (2)
I take it you figured that one out by now?
NtlmPasswordAuthentication needs to be replaced by a CIFSContext object set up with the credentials:
Properties props = new Properties(System.getProperties());
props.setProperty("jcifs.netbios.wins", "192.168.1.220");
BaseContext ctx = new BaseContext(new PropertyConfiguration(props));
// For master
CIFSContext uctx = ctx.withCredentials(new NtlmPasswordAuthenticator("domain", "username", "password"));
// < master
// ctx.withCredentials(new NtlmPasswordAuthentication(ctx, "domain", "username", "password"));
String url = "smb://host/c/My Documents/somefile.txt";
// new way
try ( SmbResource r = uctx.get(url);
InputStream in = r.openInputStream() ) {
// ...
}
// old way
try ( SmbFileInputStream in = new SmbFileInputStream(url, uctx) ) {
// ...
}
There are descriptions of breaking changes in README.MD. There are no real examples, but I would suggest looking at the test cases to get started.
from jcifs-ng.
Yes figured it out, but got my CIFSContext out of this:
CIFSContext cft = SingletonContext.getInstance();
from jcifs-ng.
Related Issues (20)
- how to do the test๏ผ HOT 4
- Server does not support NTLM authentication HOT 2
- The 2.0 series is now discontinued? HOT 2
- NTLMPasswordAuthenticator no longer working with latest bouncy castle versions HOT 9
- listFiles() on directories with large number (350 files) of files ends up in a crash
- Consider update slf4j to the latest minor release
- Bouncyastle removed "deprecated ASN1ApplicationSpecific(Parser) stuff" HOT 2
- The documentation is not helpful HOT 2
- Is there any 'flush' operation available in jcifs-ng HOT 2
- Slowness on writing files HOT 1
- SUPPORT: NoClassDefFoundError: org.bouncycastle.asn1.DERApplicationSpecific HOT 2
- Information question about SMB login (Session Setup Request) HOT 2
- Information question about method SmbTreeConnection.send0() HOT 2
- watch() filter inconsistent behaviour HOT 1
- Error reported on IP v6 device HOT 1
- Add Automatic-Module-Name
- Android SmbFile.length() return incorrect size of file. HOT 1
- Access is denied when EncryptData is True HOT 1
- Updating bcprov-jdk18on to fix CVE-2024-29857 and other CVEs HOT 3
- class org.bouncycastle.asn1.DLApplicationSpecific cannot be cast to class org.bouncycastle.asn1.ASN1TaggedObject HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jcifs-ng.