[jcifs] Intermittent issues. Getting the error jcifs.smb.SmbAuthException: Logon failure: unknown user name or bad password.

Michael B Allen ioplex at gmail.com
Tue Dec 20 18:17:02 MST 2011


On Tue, Dec 20, 2011 at 11:57 AM, Chakravarthy, Haragopal
<Haragopal.Chakravarthy at vantiv.com> wrote:
> We have been using jcifs in production for a few months now.
>
>
>
> We run the code on two JVMs, with it being active on any one node at a time.
> This morning, we started seeing the following error on the active node:
>
>
>
> jcifs.smb.SmbAuthException: Logon failure: unknown user name or bad
> password.
>
>
>
> This is not occurring on the other node, though. The codebase and properties
> (used in the Config class) are the same on both the nodes.
>
>
>
> For now, we have the code running on the node where there is no error.
>
>
>
> What could be causing this issue?
>
>
>
> Assuming the issue is due to corrupted credentials (in the properties file)
> is there a way for me to refresh the “Config” without restarting the JVM?

Hi Hara,

I have no idea what the problem is but I should point out that the
Config class should not be used to specify anything that is not static
and global. The Config class is only used to set things that a Windows
client would set in the registry like timeouts, write sizes and and so
on. Meaning you should NOT be specifying credentials using the Config
class. The jcifs.smb.client.{domain,username,password} properties are
the default credentials that the client should use when it cannot find
credentials using any other method. These default credentials are
analogous to the Computer account credentials of a Windows client.

The proper way to supply credentials is to use the
NtlmPasswordAuthentication class and then pass the desired NPA to each
SmbFile constructor.

Mike

-- 
Michael B Allen
Java Active Directory Integration
http://www.ioplex.com/


More information about the jCIFS mailing list