[jcifs] returning null username only in Mozilla

vardhaman narasagoudar vardhamanbn at gmail.com
Mon Nov 19 06:12:43 GMT 2007


Hello Dimitris,

        Thank you for your valuable information, Now I able to access the
application through  Mozilla too but I started facing a new problem, when I
run a application from my system through Mozilla and pass other domain name
and other user of that domain the application  takes the credentials  and
reads as a valid user.(Also if I give my domain and other user it passes the
application . However here I am checking with the database but how can I
avoid the first condition that is passing/entering different domain name and
that domain's user on my domain so that I can secure my application) .


On Nov 16, 2007 10:13 PM, Vorisis, Dimitris <dimitrios.vorisis at nsn.com>
wrote:

>  The standard in FireFox is to write the user name prefixed with Domain
> Name so
> - if Domain is domain
> - and user name is user
> - then write domain\user in the User Name text field.
> keep in mind that FireFox will always send credentials in case of NTLM
> which means that even if you are logged on to a domain FireFox will always
> request the user to fill the credentials in (for the first time you access
> your jsp).
> I read that there is a way to work around this but i did not follow up.
>
> I hope you found it helpful
> take care
> dimitris
>
> ps
> the reason i am writing about FireFox is that as far as I know it is based
> on the Mozilla agent.
>
>
>
>  ------------------------------
> *From:* jcifs-bounces+dimitrios.vorisis=siemens.com at lists.samba.org[mailto:
> jcifs-bounces+dimitrios.vorisis=siemens.com at lists.samba.org] *On Behalf Of
> *vardhaman narasagoudar
> *Sent:* Wednesday, November 14, 2007 11:27
> *To:* yannick at smellyfrog.com
> *Cc:* jcifs at lists.samba.org
> *Subject:* [jcifs] returning null username only in Mozilla
>
> Hello ,
>
>   I am trying for windows Authentication ..using JSP. +JCIFS + Netbeans+
> Orcale. When I run the application on IE it run properly displaying the
> username and the domain name. But when I run the same application on Mozilla
> I am able to get only the username but *not the domain name. *How can I
> overcome this problem?
>
> I am using
> 1. String sysUser = request.getRemoteUser();
>     out.println(sysUser);
> 2. jcifs.smb.NtlmPasswordAuthentication auth =
>   (jcifs.smb.NtlmPasswordAuthentication)request.getSession().getAttribute("NtlmHttpAuth");
>
>   String user = auth.getUsername();
>   String domain = auth.getDomain();
>
>   out.println("user "+ user);
>   out.println("domain"+ domain);
>
> this is the web.xml file
>
> <filter>
>   <filter-name>NtlmHttpFilter</filter-name>
>   <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
>
>   <init-param>
>       <param-name> jcifs.http.domainController</param-name>
>       <param-value>192.168.1.11</param-value>
>   </init-param>
>
>   <init-param>
>       <param-name> jcifs.smb.client.domain</param-name>
>       <param-value>NYC-USERS</param-value>
>   </init-param>
>   <init-param>
>       <param-name>jcifs.smb.client.username</param-name>
>       <param-value>somenycuser</param-value>
>   </init-param>
>   <init-param>
>       <param-name>jcifs.smb.client.password</param-name>
>       <param-value>AReallyLoooongRandomPassword</param-value>
>   </init-param>
> </filter>
>
> <filter-mapping>
>   <filter-name>NtlmHttpFilter</filter-name>
>   <url-pattern>/*</url-pattern>
> </filter-mapping>
>
> How can I display/ read the domain name in when running the application on
> Mozilla?
>
> Looking forward for your reply.
>
> --
> Thanks & Regards
> Vardhaman B.N
> 9945840928
>



-- 
Thanks & Regards
Vardhaman B.N
9945840928
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the jcifs mailing list