Menu

SmbAuthException: Account currently disabled

Help
Kiruxa
2014-10-07
2014-10-15
  • Kiruxa

    Kiruxa - 2014-10-07

    I get next error when use JInerop to open WMI connection:

    Caused by: jcifs.smb.SmbAuthException: Logon failure: account currently disabled.
    at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:524)
    at jcifs.smb.SmbTransport.send(SmbTransport.java:641)
    at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:395)
    at jcifs.smb.SmbSession.send(SmbSession.java:224)
    at jcifs.smb.SmbTree.treeConnect(SmbTree.java:176)
    at jcifs.smb.SmbFile.doConnect(SmbFile.java:906)
    at jcifs.smb.SmbFile.connect(SmbFile.java:949)
    at jcifs.smb.SmbFile.connect0(SmbFile.java:875)
    at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:76)
    at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:65)
    at jcifs.smb.SmbFile.getInputStream(SmbFile.java:2833)
    at rpc.ncacn_np.RpcTransport.attach(RpcTransport.java:91)
    at rpc.Stub.attach(Stub.java:105)
    at rpc.Stub.call(Stub.java:110)
    at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKCR(JIWinRegStub.java:132)

    What can be reason? Is it configuration issue?

     
    • Vikram Roopchand

      Hi,

      Yes its a configuration issue. The account you are using us disabled and
      hence windows will not allow anything to be done using it.

      Best regards,
      Vikram
      On Oct 7, 2014 1:34 PM, "Kiruxa" kirilll@users.sf.net wrote:

      I get next error when use JInerop to open WMI connection:

      Caused by: jcifs.smb.SmbAuthException: Logon failure: account currently
      disabled.
      at jcifs.smb.SmbTransport.checkStatus(SmbTransport.java:524)
      at jcifs.smb.SmbTransport.send(SmbTransport.java:641)
      at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:395)
      at jcifs.smb.SmbSession.send(SmbSession.java:224)
      at jcifs.smb.SmbTree.treeConnect(SmbTree.java:176)
      at jcifs.smb.SmbFile.doConnect(SmbFile.java:906)
      at jcifs.smb.SmbFile.connect(SmbFile.java:949)
      at jcifs.smb.SmbFile.connect0(SmbFile.java:875)
      at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:76)
      at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:65)
      at jcifs.smb.SmbFile.getInputStream(SmbFile.java:2833)
      at rpc.ncacn_np.RpcTransport.attach(RpcTransport.java:91)
      at rpc.Stub.attach(Stub.java:105)
      at rpc.Stub.call(Stub.java:110)
      at
      org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKCR(JIWinRegStub.java:132)

      What can be reason? Is it configuration issue?

      SmbAuthException: Account currently disabled
      https://sourceforge.net/p/j-interop/discussion/600730/thread/ac6efc9d/?limit=25#1720


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/j-interop/discussion/600730/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Kiruxa

    Kiruxa - 2014-10-07

    Thank you for response.

    I run program as Administrator account and it can not be disabled.
    From program I try to connect to WMI on local machine.
    This is my code:

    JISystem.setAutoRegisteration(true);
    session = JISession.createSession();
    session.useSessionSecurity(true);
    JIClsid clsid = JIClsid.valueOf("76A64158-CB41-11d1-8B02-00600806D9B6");
    clsid.setAutoRegistration(true);
    JIComServer server = new JIComServer(clsid, "localhost", session);

    And error occured on last line.
    Which account relates this error?

     
    • Vikram Roopchand

      Hi,

      Since you used the native code here (when you used the jisession with
      parameters) it took credentials of the logged in user. Is this the
      Administrator or someone else ?

      Best regards,
      Vikram
      On Oct 7, 2014 1:52 PM, "Kiruxa" kirilll@users.sf.net wrote:

      Thank you for response.

      I run program as Administrator account and it can not be disabled.

      From program I try to connect to WMI on local machine.
      This is my code:

      JISystem.setAutoRegisteration(true);
      session = JISession.createSession();
      session.useSessionSecurity(true);
      JIClsid clsid = JIClsid.valueOf("76A64158-CB41-11d1-8B02-00600806D9B6");
      clsid.setAutoRegistration(true);
      JIComServer server = new JIComServer(clsid, "localhost", session);

      And error occured on last line.
      Which account relates this error?


      SmbAuthException: Account currently disabled
      https://sourceforge.net/p/j-interop/discussion/600730/thread/ac6efc9d/?limit=25#4886


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/j-interop/discussion/600730/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
  • Kiruxa

    Kiruxa - 2014-10-07

    Yes, logged user is administrator.

     
  • Kiruxa

    Kiruxa - 2014-10-07

    Guest account is disabled.
    But I have another computer with same OS, and this code work fine on it. But guest account is disabled too there.

     
  • Kiruxa

    Kiruxa - 2014-10-07

    I checked this settings, but it was already set as "Classic"

     
    • Vikram Roopchand

      Well then that's that :) ... you will have to debug this and see which
      account is being used by SMB logon process. I suggest get sources to JCIFS
      and set it up ...

      best regards,
      Vikram

      On Tue, Oct 7, 2014 at 2:39 PM, Kiruxa kirilll@users.sf.net wrote:

      I checked this settings, but it was already set as "Classic"

      SmbAuthException: Account currently disabled
      https://sourceforge.net/p/j-interop/discussion/600730/thread/ac6efc9d/?limit=25#67e6


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/j-interop/discussion/600730/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      The Mind is a place of its own. It can make a heaven out of hell or a hell
      out of heaven. Attitude is everything. No matter how adverse conditions
      maybe, one has the capacity to turn things around by one's Determination,
      Perseverance and Hardwork.

      John Milton
      (Paradise Lost)

       
  • Kiruxa

    Kiruxa - 2014-10-08

    Thank you, Vikram.
    I have debugged it and have got following result.
    If I run program first time, it tries to make changes in register for DLL/OSX. If I create session without credentials (JISession.createSession()), then program failed with jcifs.smb.SmbAuthException, because it uses GUEST account for some reason. But if I use JISession.createSession(domain, user, password), then changes for DLL/OSX are successful.
    The most interesting that for another actions (query and methods for WMI) I can use JISession.createSession() and it works fine. So if I run program first time with JISession.createSession(domain, user, password) then for another runs I can use JISession.createSession(), because changes for DLL/OSX makes only once.
    My problem that I can not use credentials in program, so I must use only JISession.createSession().Is it possible to make changes for DLL/OSX without using credentials in program?

     
    • Vikram Roopchand

      Hi,

      We make changes to the registry via jcifs (SMB). This is ofcourse non
      native, however if you do not want to use credentials you will have to go
      native and write a JNI application to do the same.

      If I may ask, are you only going to be on Windows ? It seems so since you
      are using the native capability (which are really dislike and don't
      advertise). If the answer is positive, have you considered jacob (java com
      bridge) project ?

      best regards,
      Vikram

      On Wed, Oct 8, 2014 at 2:44 PM, Kiruxa kirilll@users.sf.net wrote:

      Thank you, Vikram.
      I have debugged it and have got following result.
      If I run program first time, it tries to make changes in register for
      DLL/OSX. If I create session without credentials
      (JISession.createSession()), then program failed with
      jcifs.smb.SmbAuthException, because it uses GUEST account for some reason.
      But if I use JISession.createSession(domain, user, password), then changes
      for DLL/OSX are successful.
      The most interesting that for another actions (query and methods for WMI)
      I can use JISession.createSession() and it works fine. So if I run program
      first time with JISession.createSession(domain, user, password) then for
      another runs I can use JISession.createSession(), because changes for
      DLL/OSX makes only once.
      My problem that I can not use credentials in program, so I must use only
      JISession.createSession().Is it possible to make changes for DLL/OSX
      without using credentials in program?


      SmbAuthException: Account currently disabled
      https://sourceforge.net/p/j-interop/discussion/600730/thread/ac6efc9d/?limit=25#b1c7


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/j-interop/discussion/600730/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      The Mind is a place of its own. It can make a heaven out of hell or a hell
      out of heaven. Attitude is everything. No matter how adverse conditions
      maybe, one has the capacity to turn things around by one's Determination,
      Perseverance and Hardwork.

      John Milton
      (Paradise Lost)

       
  • Kiruxa

    Kiruxa - 2014-10-15

    I use J-Interop for access to WMI on local machine only. Do you think Jacob is better for it?
    For resolving problem with SmbAuthException I create session with credentials only once. And after creating connection without credentials works fine.

     

    Last edit: Kiruxa 2014-10-15

Log in to post a comment.