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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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)
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?
--
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)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 ...
--
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.
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?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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 ?
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?
--
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)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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?
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:
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?
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:
Yes, logged user is administrator.
Okay, what about "guest" user ? Is that enabled or disabled ?
best regards,
Vikram
On Tue, Oct 7, 2014 at 2:09 PM, Kiruxa kirilll@users.sf.net wrote:
--
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)
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.
Its the security settings. LSA settings -> "Network Access: Sharing and
security model for local accounts" , change this to "classic".
best regards,
Vikram
On Oct 7, 2014 2:18 PM, "Kiruxa" kirilll@users.sf.net wrote:
I checked this settings, but it was already set as "Classic"
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:
--
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)
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?
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:
--
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)
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
Yes Jacob is jni and hence runs with the auth of the logged in user.
Best regards,
Vikram
On Oct 15, 2014 4:29 PM, "Kiruxa" kirilll@users.sf.net wrote: