[jcifs] Re: Allowing for login authentication to mulitple domains

MSDean at beckman.com MSDean at beckman.com
Wed Feb 9 16:00:16 GMT 2005


Thanks Michael,

Would the code below (from FAQ) be resilant to DC failures (the issue you
originally pointed out)?

>>>

// To authenticate arbitrary credentials (not necessarily web clients) the
jcifs.smb.Session.logon() method can be used like:

UniAddress mydomaincontroller = UniAddress.getByName( "192.168.1.15" );
NtlmPasswordAuthentication mycreds = new NtlmPasswordAuthentication( "ntdom",
"user", "pass" );
try {
    SmbSession.logon( mydomaincontoller, mycreds );
    // SUCCESS
    return true;
} catch( SmbAuthException sae ) {
    // AUTHENTICATION FAILURE
    return false;
} catch( SmbException se ) {
    // NETWORK PROBLEMS?
    se.printStackTrace();
}

<<<

-Mark



                                                                                                                                           
                      "Michael B Allen"                                                                                                    
                      <mba2000 at ioplex.c        To:       MSDean at beckman.com                                                                
                      om>                      cc:                                                                                         
                                               Subject:  Re: Allowing for login authentication to mulitple domains                         
                      02/08/2005 11:10                                                                                                     
                      PM                                                                                                                   
                                                                                                                                           
                                                                                                                                           




http://jcifs.samba.org/src/docs/faq.html#auth

--
IRC - where men are men, women are men, and the boys are FBI agents.









More information about the jcifs mailing list