The tool of choice seems to be JCIFS, so this is the minimal stripped-down example
to do this.
NtlmPasswordAuthentication auth1= new NtlmPasswordAuthentication("yourdomain", "theuser", "thepassword" );
InetAddress address=InetAddress.getByName("the.domain.controller");
UniAddress dc = new UniAddress(address);
SmbSession.logon(dc, auth1);
This will throw an exception when id or password is wrong. Otherwise it just terminates without an error.
No comments:
Post a Comment