[jcifs] Not getting remote username

vardhaman narasagoudar vardhamanbn at gmail.com
Thu Nov 8 05:37:02 GMT 2007


Hello ,

 When I added the below line in my web.xml I am getting exception

<filter>
               <filter-name>NtlmHttpFilter</filter-name>
               <filter-class>jcifs.http.NtlmHttpFilter</filter-class>

               <init-param>
                       <param-name>jcifs.http.domainController</param-name>
                       <param-value>My Server IP address</param-value>
               </init-param>
               <init-param>
                       <param-name>jcifs.smb.client.logonShare</param-name>
                       <param-value>Learnet</param-value>
               </init-param>
       </filter>

<filter-mapping>
   <filter-name>NtlmHttpFilter</filter-name>
   <url-pattern>/*</url-pattern>
</filter-mapping>

Please check this exception:

 jcifs.smb.SmbException: The network name cannot be found.
       jcifs.smb.SmbTransport.send(SmbTransport.java:698)
       jcifs.smb.SmbSession.sessionSetup(SmbSession.java:271)
       jcifs.smb.SmbSession.send(SmbSession.java:228)
       jcifs.smb.SmbTree.treeConnect(SmbTree.java:134)
       jcifs.smb.SmbTree.sendTransaction(SmbTree.java:54)
       jcifs.smb.SmbSession.logon(SmbSession.java:163)
       jcifs.smb.SmbSession.logon(SmbSession.java:152)
       jcifs.http.NtlmHttpFilter.doFilter(NtlmHttpFilter.java:155)
       org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:368)

 How can I resolve this? Please help me out.

-- 
Thanks & Regards
Vardhaman B.N
9945840928


On Nov 7, 2007 5:08 PM, vardhaman narasagoudar <vardhamanbn at gmail.com> wrote:
> Hello Eric,
>
>      Thank you for the reply. I created my account on the server and
> passed my username and password . I am able to authenticate.
>
>      But when I sit on other system (Not my sytem) And try to
> access/run the application along with my username and password it
> still runs , .Also if I pass other person username and password whom I
> have entered in server's account I am able to access/run the
> application.
>
>      How can I get System username? Such that the server should read
> my System name....without a pop-up window coming.
>
>
> --
> Thanks & Regards
> Vardhaman B.N
> 9945840928
>
>
>
> On Nov 7, 2007 4:26 PM, Eric Glass <eric.glass at gmail.com> wrote:
> > The filter will only be able to authenticate accounts that the server
> > (the machine specified as the "domain controller") knows about.  If
> > you are logged in to your client box using a domain account, and the
> > server is in that domain, it should work.  Or if you specify a local
> > account on the server when prompted, it should work.  But the server
> > will not be able to authenticate you against a local account that
> > exists only on the client machine.
> >
> > Technically, you might be able to modify the filter to grab the
> > client's IP address and connect back to that in place of the domain
> > controller.  This would probably introduce more issues than it
> > resolves though, as there would be a relatively narrow set of
> > circumstances in which it would work.
> >
> >
> > On Nov 7, 2007 4:51 AM, vardhaman narasagoudar <vardhamanbn at gmail.com> wrote:
> > > Hello Yannick,
> > >
> > >       Thank you for the reply.  ....still not working.
> > > 1. The server's username is broad-4\Administrator and password is bv4.
> > >
> > > 2. When I run the application in my system I get a pop-up window
> > > asking for username and password. If i enter my system username and
> > > password ( broad-2\Administrator and bv2), I am not able to access the
> > > application.
> > >     But if I give enter broad-2\Administrator and bv4 I am able to
> > > access the application. Also if I enter bgkdbgks\Administrator and bv4
> > > I am able access the application.
> > >
> > > How can I check for remote username of the system? Actually the
> > > application should ask for local system name and password .
> > >
> > > --
> > > Thanks & Regards
> > > Vardhaman B.N
> > > 9945840928
> > >
> > >
> > >
> > > On Nov 7, 2007 2:23 PM, Yannick Lavanant <yannick at smellyfrog.com> wrote:
> > > > I could be off the mark but you might need pre-authentication:
> > > >
> > > > In my web.xml I have the following:
> > > >
> > > >     <init-param>
> > > >         <param-name>jcifs.smb.client.username</param-name>
> > > >         <param-value>AuthorisedAccount</param-value>
> > > >     </init-param>
> > > >     <init-param>
> > > >         <param-name>jcifs.smb.client.password</param-name>
> > > >         <param-value>AuthorisedPassword</param-value>
> > > >     </init-param>
> > > >
> > > > Where AuthorisedAccoun/AuthorisedPassword is a username/password pair
> > > > authorised to perform authentication on our domain.
> > > > Hope this helps
> > > > Yannick
> > > >
> > > >
> > > > vardhaman narasagoudar wrote:
> > > > > Hello,
> > > > >
> > > > >       I am trying for windows authentication for this I have
> > > > > downloaded jcifs.jar 1.1.11 and placed it in lib folder of the
> > > > > application and modified the code in web.xml as givien in the site of
> > > > > jcifs.samba , Developing a application in JSP/Struts + Tomcat 5.5. The
> > > > > application has been placed on windows 2003 server, But when I am
> > > > > trying to run the application  from my work station that is xp I am
> > > > > getting a pop-up window which ask for username and password . If I try
> > > > > entering my system name and password ...the application is not
> > > > > allowing me to access the application. But if I enter server system
> > > > > username and password I am able to access the application.
> > > > >
> > > > >       But my requirement is such that I should be able to get the
> > > > > remote system username so that I can check with database and
> > > > > authenticate.How can I achieve this?
> > > > >
> > > > > In web.xml file I have added this line please help me out
> > > > >
> > > > > filter>
> > > > > <filter-name>NtlmHttpFilter</filter-name>
> > > > > <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
> > > > > <init-param>
> > > > > <param-name>jcifs.http.domainController</param-name>
> > > > > <param-value>1Server IP address</param-value>
> > > > > </init-param>
> > > > > </filter>
> > > > > <filter-mapping>
> > > > > <filter-name>NtlmHttpFilter</filter-name>
> > > > > <url-pattern>/*</url-pattern>
> > > > > </filter-mapping>
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> >
>


More information about the jcifs mailing list