[jcifs] NTLM Standalone Authentication

Glass, Eric eric.glass at capitalone.com
Tue Oct 1 04:01:48 EST 2002


jCIFS provides SMB client access from Java -- NTLM authentication is one
particular aspect that is of key interest to those environments.  Other uses
would be standalone authentication (like you are using) and access to
windows/samba shared files.  Quite a nifty package -- I'm sure others on
this list could provide countless other uses.

I'm not sure about the SmbSession deprecation note -- I believe Mike has
endorsed the below method of doing standalone authentication, but there may
be a "better" way forthcoming in a future release.


> -----Original Message-----
> From: Joseph Kezar [mailto:jkezar at romz.no-ip.com]
> Sent: Monday, September 30, 2002 1:37 PM
> To: Glass, Eric
> Cc: jcifs at lists.samba.org
> Subject: Re: [jcifs] NTLM Standalone Authentication
> 
> 
> Thanks Eric!
>     That worked great for our needs.  I am curious why the API tells 
> developers to avoid using the class SmbSession.
> And why does the API documentation say this: "This class will 
> be hidden 
> from the distribution API documentation at some time in the future. "?
> 
> Is jCIFS mainly for tomcat/resin support?  I write alot of standalone 
> applications that require some sort of password 
> authtication(against a 
> PDC) and this seems to do the trick.  
> 
> Glass, Eric wrote:
> 
> >Look at SmbSession.logon, something like this:
> >
> >NtlmPasswordAuthentication auth =
> >        new NtlmPasswordAuthentication("domain", "username", 
> "password");
> >UniAddress dc = UniAddress.getByName("pdcname");
> >try {
> >    SmbSession.logon(dc, auth);
> >    return true;
> >} catch (SmbException ex) {
> >    return false;
> >}
> >
> >  
> >
> >>-----Original Message-----
> >>From: Joseph Kezar [mailto:jkezar at doc.state.vt.us]
> >>Sent: Monday, September 30, 2002 12:47 PM
> >>To: jcifs at lists.samba.org
> >>Subject: [jcifs] NTLM Standalone Authentication
> >>
> >>
> >>Is there an abstract method to authenticate against a PDC/BDC 
> >>and get a 
> >>boolean value as it return?
> >>
> >>Something like:
> >>boolean canIProceed = 
> >>NTLMAuthenticator.authenticate("username","password","pdcname"
> >>,"bdcname");
> >>if(canIProceed) {
> >>  System.out.println("I authenticated successfuly!");
> >>} else {
> >>  System.out.println("The PDC/BDC rejected your login");
> >>}
> >>
> >>    
> >>
> > 
> >*************************************************************
> *************
> >The information transmitted herewith is sensitive 
> information intended only
> >for use by the individual or entity to which it is 
> addressed. If the reader
> >of this message is not the intended recipient, you are 
> hereby notified that
> >any review, retransmission, dissemination, distribution, 
> copying or other
> >use of, or taking of any action in reliance upon this information is
> >strictly prohibited. If you have received this communication 
> in error,
> >please contact the sender and delete the material from your computer.
> >  
> >
> 
> 
> 
 
**************************************************************************
The information transmitted herewith is sensitive information intended only
for use by the individual or entity to which it is addressed. If the reader
of this message is not the intended recipient, you are hereby notified that
any review, retransmission, dissemination, distribution, copying or other
use of, or taking of any action in reliance upon this information is
strictly prohibited. If you have received this communication in error,
please contact the sender and delete the material from your computer.



More information about the jcifs mailing list