KS-Soft. Network Management Solutions
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister    ProfileProfile    Log inLog in 

Active Script authentication problem

 
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting
View previous topic :: View next topic  
Author Message
argis



Joined: 06 May 2019
Posts: 31

PostPosted: Wed Jul 06, 2022 8:24 pm    Post subject: Active Script authentication problem Reply with quote

I'm having problems running a VBscript ActiveScript on a 2019 server on our domain. The script runs fine on all of our other 38 servers, including some other 2019 ones.
All other standard tests on this server, such as disk space, CPU, top process, free memory etc all run fine. The AHM server user is a domain admin.
I checked the Security event logs on the problem server, and whenever I run this test there is an audit failure "An account failed to log on". In the details it shows the failed user as local to the AHM server, not the domain (this is the "TargetDomainName" attribute in XML view).
I added an entry in Connection Manager for the problem server, and tried some different domain admin users, and I get the same result, an audit failure shows the user as a local user on the AHM server, not the domain.
I checked this on other servers and when I run the same test it succeeds and the event logs shows the user as a domain user, as it should.
I deleted the problem servers folder from AHM and re-created it, but it gave the same result.
Since all our other servers are fine, I'm guessing there is a problem on this particular server rather at the AHM end, but I don't know what would cause a credential to lose its domain and revert to the AHM server name.
Any ideas?
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12793
Location: USA

PostPosted: Thu Jul 07, 2022 5:25 am    Post subject: Reply with quote

1) HostMonitor version?

2) We recommend to use Shell Script method instead of Active Script. Active Script does not work in x64 mode (e.g. when test performed by 64bit version of RMA agent)

3) HostMonitor impersonates user account for Active Script tests but everything else depends on Windows COM object and script code.
What exactly commands, objects do you use in the script?
Do you use GetObject("winmgmts:{impersonationLevel=impersonate}..) or GetObject("winmgmts:{impersonationLevel=impersonate," & "authenticationLevel=pktPrivacy}..) commands?

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
argis



Joined: 06 May 2019
Posts: 31

PostPosted: Thu Jul 07, 2022 3:17 pm    Post subject: Reply with quote

HostMonitor version 1s 11.98.

In this instance the test is running directly from AHM, but we also run it on other sites with an RMA, and it works OK there.

I wasn't aware of the difference between Active Script and Shell Script, but I'd like to move all the VBScript to PowerShell for future compatibility.
The script uses Wscript.Shell and scripting.filesystemobject, and calls WMIC.exe to get disk, RAM & CPU information. It doesn't use winmgmts.
I've made a PowerShell Active Script to return the same info using inbuilt PS functions and tested it, and I get the same result on this server, it fails with the same auth error in the event log. It works OK on other servers though.
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12793
Location: USA

PostPosted: Fri Jul 08, 2022 10:49 am    Post subject: Reply with quote

Pretty old version. As I see you ordered update and may upgrade to latest version, right?

However 11.98 should work properly as well. We checked old code, it impersonates user account for Active Script tests.
That's very strange - correct authentication on other servers, wrong authentication on one server. Sorry, we cannot explain this.
I would seggest to try Shell Script test, you need to change script output - it should write result like scriptres:Bad:90 %
https://www.ks-soft.net/hostmon.eng/mframe.htm#tests.htm#shellres
There are Script Manager with various samples..

Quote:
The script uses Wscript.Shell and scripting.filesystemobject, and calls WMIC.exe to get disk, RAM & CPU information.

All checks in one script? May be you can use standard built-in tests?

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
argis



Joined: 06 May 2019
Posts: 31

PostPosted: Wed Jul 13, 2022 7:16 pm    Post subject: Reply with quote

We did order a new version for a client site, but we haven't upgraded our own install yet. I should get onto that.

The PowerShell test I created does use that output format, but it can't get any information to return.
The test returns the disk sizes, installed RAM, number of CPUs & cores, and whether or not the machine is a VM. It's useful information to have on hand when diagnosing problems. It just runs once a day.

I've since discovered 3 more servers with the same problem. It looks like another Microsoft mystery...
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12793
Location: USA

PostPosted: Thu Jul 14, 2022 3:23 am    Post subject: Reply with quote

Quote:
The test returns the disk sizes, installed RAM, number of CPUs & cores, and whether or not the machine is a VM. It's useful information to have on hand when diagnosing problems. It just runs once a day.

There is System Info tool (you may select test related to some host and use popup menu System Info)
https://www.ks-soft.net/hostmon.eng/mframe.htm#netmap.htm#v10_sysinfo

Need more data? Just number of CPU cores and whether or not the machine is a VM?

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
argis



Joined: 06 May 2019
Posts: 31

PostPosted: Thu Jul 14, 2022 4:17 pm    Post subject: Reply with quote

System Info is good for a deeper dig, but I don't use it much. It doesn't work on our RMAs (all active) though I see in the help that it's supposed to. Is that a config setting I've got wrong?
This test just gives a quick overview at a glance on the main screen. Typically it will look something like this:
C: 40GB - D: 100GB - RAM: 32GB - CPU: 1/4/4 - VM:Y
(CPU is Physical CPUs/Logical CPUs/Cores, VM is Y or N)

That's all I can think of that might be useful.
Back to top
View user's profile Send private message
KS-Soft



Joined: 03 Apr 2002
Posts: 12793
Location: USA

PostPosted: Fri Jul 15, 2022 2:12 am    Post subject: Reply with quote

Quote:
It doesn't work on our RMAs (all active) though I see in the help that it's supposed to.

There were couple bugs related to RMA in version 11. Fixed couple years ago.

Regards
Alex
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    KS-Soft Forum Index -> Configuration, Maintenance, Troubleshooting All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

KS-Soft Forum Index