Username and password incorrect

Help
dag
2010-12-22
2012-11-29
  • dag

    dag - 2010-12-22

    We're using j-interop 2.07 jar. We run into a username and password problem. The username and password are entered correctly. However, we get an error when trying to connect to the COM server. See error below:

    SEVERE: The server process could not be started because the configured identity is incorrect.  Check the username and password.
    org.jinterop.dcom.common.JIException: The server process could not be started because the configured identity is incorrect.  Check the username and password.
    at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:550)
    at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:458)
    at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:396)

    Caused by: org.jinterop.dcom.common.JIRuntimeException: The server process could not be started because the configured identity is incorrect.  Check the username and password.
    at org.jinterop.dcom.core.JIRemActivation.read(JIRemActivation.java:191)
    at ndr.NdrObject.decode(NdrObject.java:19)
    at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:138)
    at rpc.Stub.call(Stub.java:112)
    at org.jinterop.dcom.core.JIComServer.init(JIComServer.java:538)
    … 11 more

    With the same username and password using 2.06 jar, it works without problem. Any idea?

     
  • Vikram Roopchand

    Season's Greetings,

    I think it might be that we moved to "impersonation" by that release (http://msdn.microsoft.com/en-us/library/ms691341%28VS.85%29.aspx). If you can check the code in JIRemActivation.java ("core" package) and change it to "RPC_C_IMP_LEVEL_IDENTIFY" (line 39) and then try this. We will make it configurable if it works for you.

    thanks,
    best regards,
    Vikram

     
  • dag

    dag - 2010-12-28

    We tried it out, but that doesn't work. One difference we know between 2.06 and 2.07 is that 2.07 has support for NTLMv2.

     
  • dag

    dag - 2011-02-04

    We have made some progress in identifying the problem. When a machine is joined to a domain, we don't have username/password problem. However, when the machine is not joined to the domain, we have invalid username/password problem.

    We use an empty string for domain, which we think means authenticating against a local user.

    JISession session = JISession.createSession("", username, password);

    IJIComObject comObject = new JIComServer(JIProgId.valueOf(ERWIN_COM_API_PROGID),address,session).createInstance();

    The session object is created fine, but it fails on the second line with this error:

    SEVERE: The attempted logon is invalid. This is either due to a bad username or authentication information.
    org.jinterop.dcom.common.JIException: The attempted logon is invalid. This is either due to a bad username or authentication information.
    at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKLM(JIWinRegStub.java:115)
    at org.jinterop.dcom.core.JIProgId.getIdFromWinReg(JIProgId.java:130)
    at org.jinterop.dcom.core.JIProgId.getCorrespondingCLSID(JIProgId.java:162)
    at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:413)

     
  • Vikram Roopchand

    Have you tried with  "localhost"/ip/"127.0.0.1" or Machine name there instead of leaving it "" ?

    thanks,
    best regards,
    Vikram

     
  • dag

    dag - 2011-02-04

    Yes. I tried the machine name. Using either empty string or the server address (meaning using local user instead of domain user) used to work a long time ago. And I don't know starting with which version of j-interop that started failing.

     
  • Vikram Roopchand

    Are you using NTLMv2 ?

     
  • dag

    dag - 2011-02-04

    No. It fails with or without NTLMv2. Doesn't matter. Does it work for you?

     
  • Vikram Roopchand

    For us it works, as a matter of fact we have very less tests with Domain credentials, most of them are with local users only.

    thanks,
    best regards,
    Vikram

     
  • dag

    dag - 2011-02-17

    Local users on a machine joined to a domain or not joined to a domain?

    I'm almost positive that it's not working. One of our customers have the same problem just now.

     
  • dag

    dag - 2011-02-21

    There is a "Network access: Sharing and security model for local accounts" option under Security Settings > Local Policies > Security Options. You can select either "Classic - local users authenticate as themselves" or "Guest only - local users authenticate as Guest".

    Choosing  "Guest only - local users authenticate as Guest" always throws a username/password problem from j-interop (and from any network access)

     
  • Kevin

    Kevin - 2011-02-22

    Just to confirm I encountered the same issue on Friday and the above has fixed it for me also - many thanks to dagsupport as you have saved me a lot of potential frustration checking dcom settings!

     
  • Vikram Roopchand

    One addition, when you use this "Guest Only" setting, the authentication is completely bypassed by Windows and the Guest user is used. I think in most of the OS versions now it is disabled.

    This is a link which might help you also, just in case something goes wrong again http://j-integra.intrinsyc.com/support/com/doc/remoteaccess.html

    thanks,
    best regards,
    Vikram

     
  • saikat bose

    saikat bose - 2011-11-22

    Hi,
    I'm new to j-interop. I'm able to successfully get all the Windows system monitor information for remote machines in a Domain.
    But the problem I face with the machines which are in network but under WORKGROUP.

    I'm providing the administrative login credential to the program but fails. here is the error log:

    org.jinterop.dcom.common.JIException: The attempted logon is invalid. This is either due to a bad username or authentication information.
    at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKLM(JIWinRegStub.java:115)
    at org.jinterop.dcom.core.JIProgId.getIdFromWinReg(JIProgId.java:130)
    at org.jinterop.dcom.core.JIProgId.getCorrespondingCLSID(JIProgId.java:162)
    at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:413)
    at com.skytech.sysMonitor.PerformanceMonitor.setWindowsCredentials(PerformanceMonitor.java:70)
    at com.skytech.sysMonitor.PerformanceMonitor.main(PerformanceMonitor.java:793)
    Caused by: jcifs.smb.SmbAuthException: Logon failure: unknown user name or bad password.
    at jcifs.smb.SmbSession.sessionSetup(SmbSession.java:289)
    at jcifs.smb.SmbSession.send(SmbSession.java:233)
    at jcifs.smb.SmbTree.treeConnect(SmbTree.java:154)
    at jcifs.smb.SmbFile.doConnect(SmbFile.java:847)
    at jcifs.smb.SmbFile.connect(SmbFile.java:890)
    at jcifs.smb.SmbFile.connect0(SmbFile.java:816)
    at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:73)
    at jcifs.smb.SmbFileInputStream.<init>(SmbFileInputStream.java:62)
    at jcifs.smb.SmbFile.getInputStream(SmbFile.java:2765)
    at rpc.ncacn_np.RpcTransport.attach(RpcTransport.java:91)
    at rpc.Stub.attach(Stub.java:106)
    at rpc.Stub.call(Stub.java:110)
    at org.jinterop.winreg.smb.JIWinRegStub.winreg_OpenHKLM(JIWinRegStub.java:113)
    … 5 more

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks