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

Michael B Allen <[email protected]>
Newsgroups gmane.network.samba.java
Message-ID <CAGMFw4j1vjF8fU2z2TjCyP=gcAWKLqFVXDhc9eqdZYCpxk3WOw@mail.gmail.com>
On Tue, Dec 20, 2011 at 11:57 AM, Chakravarthy, Haragopal
<[email protected]> 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/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.