[jcifs] Fwd: Fwd: NtmlHttpAuthenticationFilter

Eric Glass eric.glass at gmail.com
Thu Jul 29 14:59:50 GMT 2004


Your root issue probably involves SMB signing (which is required by
default with Windows 2003 servers).  Later versions of jCIFS provide a
better way to work with this; you just need a username and password to
initialize the connection.  So your web.xml would look something like:

  <filter>
      <filter-name>NTLM HTTP Authentication Filter</filter-name>
      <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
      <init-param>
          <param-name>jcifs.http.domainController</param-name>
          <param-value>143.245.2.201</param-value>
      </init-param>
      <init-param>
          <param-name>jcifs.smb.client.domain</param-name>
          <param-value>OEKB</param-value>
      </init-param>
      <init-param>
          <param-name>jcifs.smb.client.username</param-name>
          <param-value>myuser</param-value>
      </init-param>
      <init-param>
          <param-name>jcifs.smb.client.password</param-name>
          <param-value>mypassword</param-value>
      </init-param>
      <init-param>
          <param-name>jcifs.http.basicRealm</param-name>
          <param-value>OeKB</param-value>
      </init-param>
  </filter>

It will set up the signed connection using "OEKB\myuser" as the
domain/username, and "mypassword" as the password.  Subsequent HTTP
clients will be authenticated over the signed pipe to the Win2K3
controller.

Also, if you have a WINS server, you can specify its IP address in
"jcifs.netbios.wins" and take out "jcifs.http.domainController"; jCIFS
will use the WINS server to find all controllers for the "OEKB"
domain, and load balance between them.  This is more scalable, and is
the preferred method.

You can actually specify a comma-separated list of IPs for
"jcifs.netbios.wins" to provide failover in the event one or more WINS
servers go down, although this doesn't appear to be documented.


Eric


On Thu, 29 Jul 2004 16:38:43 +0200 (MEST), tinytoony at gmx.at
<tinytoony at gmx.at> wrote:
> 
> Well, in fact this option is under comments - so this cannot really be the
> problem?!
> 
> best regards,
> 
> Martin


More information about the jcifs mailing list