disable remote service?

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
User avatar
M@ster
Posts: 78
Joined: Thu Oct 24, 2002 6:00 pm
Location: Germany

Post by M@ster »

Hi Alex,
is it possible to disable a service when the diskspace is low? I do not want to stop it. I have to disable it, because it would restart automatically.

Regards
René
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Sorry, HostMonitor cannot disable services. But I think there are many freeware command line utilities those can do that.
If you will not be able to find one of these utilities, we can create it for you.

Regards
Alex
User avatar
M@ster
Posts: 78
Joined: Thu Oct 24, 2002 6:00 pm
Location: Germany

Post by M@ster »

If you will not be able to find one of these utilities, we can create it for you.
If you could show me an easy way to disable a remote service if a test fails, I would be happy :smile:

Regards
René

[edit]
I have a script.
[/edit]

<font size=-1>[ This Message was edited by: M@ster on 2003-05-02 05:15 ]</font>
User avatar
M@ster
Posts: 78
Joined: Thu Oct 24, 2002 6:00 pm
Location: Germany

Post by M@ster »

I try to realise it with the sc.exe from the NT4 Ressource Kit.
I wrote a batch:
@ECHO off
echo Stopping the Services on %1
echo ==================
@echo on
sc \%1 stop MSEXchangeMTA
sc \%1 config MSEXchangeMTA start= disabled
pause

When the test failes, I call an external program with the testname as parameter. But it only gives me an error:
C:Program FilesHostMonitor>sc \servername stop MSEXchangeMTA
[SC] OpenSCManager failed 5

When I go to a command box and type in the name of the script with the servername as parameter, it works great.

Can you help me?
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

Is HostMonitor running as service? What account it uses? What version of HostMonitor?

Regards
Alex
User avatar
M@ster
Posts: 78
Joined: Thu Oct 24, 2002 6:00 pm
Location: Germany

Post by M@ster »

On 2003-05-02 12:54, KS-Soft wrote:
1. Is HostMonitor running as service?
2. What account it uses?
3. What version of HostMonitor?

Regards
Alex
1) yes
2) an account with domain admin rights
3) 3.56

René

<font size=-1>[ This Message was edited by: M@ster on 2003-05-05 00:27 ]</font>
User avatar
Marcus
Posts: 367
Joined: Mon Nov 18, 2002 6:00 pm

Post by Marcus »

>[SC] OpenSCManager failed 5

failed 5 = access denied.

See the security eventlog which account is actually connecting to the system.
User avatar
M@ster
Posts: 78
Joined: Thu Oct 24, 2002 6:00 pm
Location: Germany

Post by M@ster »

It is the right account.

<font size=-1>[ This Message was edited by: M@ster on 2003-05-05 02:02 ]</font>
User avatar
Marcus
Posts: 367
Joined: Mon Nov 18, 2002 6:00 pm

Post by Marcus »

> It is the right account.

According to the system it has not sufficient rights.

That's why I advised to look in the security eventlog. You then at least know for sure if you're connecting with the account you think you are connecting with.

If it is the right account, it has insuffient rights on the target computer.
User avatar
M@ster
Posts: 78
Joined: Thu Oct 24, 2002 6:00 pm
Location: Germany

Post by M@ster »

Now I know the cause of the problem.

HM ist started as system account (service). Thus all processes generated by HM run with the same permissions!

@Alex:
I would need an option to run an external command with a special user. Could you implement that? Could you make an "innoficial update" for me?
For now, I will set up another instance on another machine to do this task :sad:
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

>HM ist started as system account (service). Thus all processes generated by HM run with the same permissions!

This problem already fixed. http://www.ks-soft.net/cgi-bin/phpBB/vi ... forum=10&0

I thought it was fixed long time ago, but it was fixed just last month. Please upgrade to version 3.68 before applying "unofficial" update.

Regards
Alex
User avatar
M@ster
Posts: 78
Joined: Thu Oct 24, 2002 6:00 pm
Location: Germany

Post by M@ster »

On 2003-05-05 12:03, KS-Soft wrote:

This problem already fixed. http://www.ks-soft.net/cgi-bin/phpBB/vi ... forum=10&0

Regards
Alex

Thank you!
How could I miss that :sad:
agressiv
Posts: 35
Joined: Sun Oct 06, 2002 6:00 pm

Post by agressiv »

I still have this problem where WMI calls within VBScript still run as the System account, even though all of hostmonitor's tests are run with a Domain Admin.

1) If I don't run Hostmon as a service, we'd have to auto-login the box as a domain admin. Not desireable.

2) If I configure hostmon's service to actually run as a Domain Admin, we don't get the tray icon.

Suggestion:
Allow the "execute script" to *specifically* run as a separate user, much like what we can do with other tests.

Greg
KS-Soft
Posts: 12821
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

>Allow the "execute script" to *specifically* run as a separate user, much like what we can do with other tests.

HostMonitor starts that thread under specified user account. But scripting host (MS Script Control) starts another thread when executes script. And that thread (started by scripting host) does not inherit security context from parent thread, it inherits context of the application :sad:
I am afraid we don't have good solution for this problem.

Regards
Alex

<font size=-1>[ This Message was edited by: KS-Soft on 2003-05-24 01:24 ]</font>
Post Reply