<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Custom Commands in Server Management - Systems Insight Manager</title>
    <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203610#M1367</link>
    <description>Well, I've been researching on my own a bit and what I found was that the Custom Commands get the "run-as" username from the user adding the command. But since the SSH Daemon doesn't like "domain\user" logins it fails to execute the command. My solution was to change the username in the database.&lt;BR /&gt;&lt;BR /&gt;I still get the message "The host key supplied was not valid." and I believe that it comes from the initial commands that is run when starting SIM but I haven't been able to find where the default username used when login via SSH is stated.</description>
    <pubDate>Sat, 06 Mar 2004 04:30:34 GMT</pubDate>
    <dc:creator>Daniel Hamberg</dc:creator>
    <dc:date>2004-03-06T04:30:34Z</dc:date>
    <item>
      <title>Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203597#M1354</link>
      <description>Help Please&lt;BR /&gt;&lt;BR /&gt;I am trying to setup a custom command that will kickoff a VBscript.  I want the script to recieve the %DEVICENAME% environment variable as a command line argument. An email is then sent displaying the variable. &lt;BR /&gt;&lt;BR /&gt;Here is what I have.&lt;BR /&gt;&lt;BR /&gt;test.bat&lt;BR /&gt;c:\testvar.vbs %DEVICENAME%&lt;BR /&gt;&lt;BR /&gt;test2.bat&lt;BR /&gt;c:\testvar.vbs %1%&lt;BR /&gt;&lt;BR /&gt;testvar.vbs&lt;BR /&gt;Var1 = WScript.Arguments.Item(0)&lt;BR /&gt;Set objEmail = CreateObject("CDO.Message")&lt;BR /&gt;objEmail.From = "mark.kempe@mycompany.com"&lt;BR /&gt;objEmail.To = "mark.kempe@mycompany.com"&lt;BR /&gt;objEmail.Subject = "Test email" &lt;BR /&gt;objEmail.Textbody = "Variable 1 is " &amp;amp; Var1 &lt;BR /&gt;objEmail.Send&lt;BR /&gt;&lt;BR /&gt;both batch files work fine from the command prompt using regular environment variables. However, if I run either as a custom command, it stays in a pending state with status "Running 0%" and no email is received.  Also I have tried to run the script alone as a custom command with the same pending state.&lt;BR /&gt;&lt;BR /&gt;What am I doing wrong?&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 26 Feb 2004 16:01:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203597#M1354</guid>
      <dc:creator>Mark Kempe</dc:creator>
      <dc:date>2004-02-26T16:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203598#M1355</link>
      <description>The first thing I would try would be to eliminate the batch file and eliminate the variable.  You can call the vbscript directly from the custom command.  Change the command line to something like this:&lt;BR /&gt;&lt;BR /&gt;cscript.exe "C:\Program Files\HP\testvar.vbs" //nologo&lt;BR /&gt;&lt;BR /&gt;Then remove the use of the variable.  Make sure it can send you an e-mail all by itself.  If the e-mail fails try something more generic like write a text file.  It is possible  your SIM run as account doesn't have permission to send e-mail.&lt;BR /&gt;&lt;BR /&gt;Finally to bring the variable back in you can do that within vbscript.  It would go something like this:&lt;BR /&gt;&lt;BR /&gt;Set WshShell = WScript.CreateObject("WScript.Shell")&lt;BR /&gt;&lt;BR /&gt;Var1 = WshShell.ExpandEnvironmentStrings("%DEVICENAME%")&lt;BR /&gt;&lt;BR /&gt;I hope this helps,&lt;BR /&gt;Tim</description>
      <pubDate>Fri, 27 Feb 2004 09:16:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203598#M1355</guid>
      <dc:creator>Tim McGue</dc:creator>
      <dc:date>2004-02-27T09:16:14Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203599#M1356</link>
      <description>Great, Thanks Tim&lt;BR /&gt;&lt;BR /&gt;I will try it out today.</description>
      <pubDate>Fri, 27 Feb 2004 11:22:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203599#M1356</guid>
      <dc:creator>Mark Kempe</dc:creator>
      <dc:date>2004-02-27T11:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203600#M1357</link>
      <description>Well, I tried it Tim.  I removed the batch jobs and added the var lines you gave me and used the %temp% var for testing.  running the script from the command line works fine.  When I run it as a custom command, it just sits there in a state "Pending" and never seems to run.&lt;BR /&gt;&lt;BR /&gt;I did another test using notepad.exe.  I saw the process start on the Insight Server. looked at the Task results and it showed "Pending" and "Running 0%".  I killed the process and the task results still showed "Pending" and "Running 0%".&lt;BR /&gt;&lt;BR /&gt;At this point, I am pretty sure there isn't a problem with the script.  It looks like I am having a problem running custom commands.&lt;BR /&gt;&lt;BR /&gt;Any ideas?</description>
      <pubDate>Fri, 27 Feb 2004 11:53:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203600#M1357</guid>
      <dc:creator>Mark Kempe</dc:creator>
      <dc:date>2004-02-27T11:53:32Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203601#M1358</link>
      <description>Mark:&lt;BR /&gt;&lt;BR /&gt;any chance you were part of the beta program and are running that code rather than the release code?  There was a problem in the beta that resulted in the "Running 0%" like you say and it was corrected upon release.</description>
      <pubDate>Fri, 27 Feb 2004 12:20:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203601#M1358</guid>
      <dc:creator>David Claypool</dc:creator>
      <dc:date>2004-02-27T12:20:49Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203602#M1359</link>
      <description>Hi David&lt;BR /&gt;&lt;BR /&gt;I am pretty sure it is the production release.  I didn't install it.  We are running Build C.04.00.00 and Build date of 2003-12-12 17:32.&lt;BR /&gt;&lt;BR /&gt;I have not checked if there are any SP's or patches for this release yet.</description>
      <pubDate>Fri, 27 Feb 2004 12:35:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203602#M1359</guid>
      <dc:creator>Mark Kempe</dc:creator>
      <dc:date>2004-02-27T12:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203603#M1360</link>
      <description>Yes, that's the correct one.  Personally, I haven't experienced the 0% problem on the release code.</description>
      <pubDate>Fri, 27 Feb 2004 15:48:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203603#M1360</guid>
      <dc:creator>David Claypool</dc:creator>
      <dc:date>2004-02-27T15:48:06Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203604#M1361</link>
      <description>Anyone else have any suggestions?</description>
      <pubDate>Tue, 02 Mar 2004 11:41:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203604#M1361</guid>
      <dc:creator>Mark Kempe</dc:creator>
      <dc:date>2004-03-02T11:41:00Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203605#M1362</link>
      <description>I've got the exact same problem! And I haven't been able to solve it yet, but I've got some more information for you all:&lt;BR /&gt;&lt;BR /&gt;In my case it has to do with SSH Host Keys because when ever I try a Custom Command I get two error messages in the Eventlog on the CMS:&lt;BR /&gt;&lt;BR /&gt;Did not receive identification string from 192.168.60.143.&lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt;Received disconnect from 192.168.60.143: 9: The host key supplied was not valid.&lt;BR /&gt;&lt;BR /&gt;The IP-address in the messages is the CMS's address, on which the command is to be executed on.</description>
      <pubDate>Wed, 03 Mar 2004 05:14:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203605#M1362</guid>
      <dc:creator>Daniel Hamberg</dc:creator>
      <dc:date>2004-03-03T05:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203606#M1363</link>
      <description>OK.  Baby steps first.  I need help figuring out why this is not working.  I have a batch file on my insight server that is one line:&lt;BR /&gt;&lt;BR /&gt;cc.bat - located in the root of c:\&lt;BR /&gt;&lt;BR /&gt;its content is:&lt;BR /&gt;echo test &amp;gt; test.txt&lt;BR /&gt;&lt;BR /&gt;of course no problems when I run it from the command line.&lt;BR /&gt;&lt;BR /&gt;I setup a custom command to run c:\cc.bat. No parameters or switches.&lt;BR /&gt;&lt;BR /&gt;When it runs, I get "Running 0%" and a state of "Pending" also, the task can not be killed.  The only way of getting rid of it is by rebooting the server.&lt;BR /&gt;&lt;BR /&gt;I would really appreciate some advise from one of the experts. Please direct me where to look to troubleshoot this issue.  &lt;BR /&gt;</description>
      <pubDate>Thu, 04 Mar 2004 12:01:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203606#M1363</guid>
      <dc:creator>Mark Kempe</dc:creator>
      <dc:date>2004-03-04T12:01:57Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203607#M1364</link>
      <description>Mark,&lt;BR /&gt;With the Custom Commands they do login using SSH, so you may want to check things there.&lt;BR /&gt;&lt;BR /&gt;By any chance is the account you installed HPSIM under different from the one you're now logging in to HPSIM?&lt;BR /&gt;If so, try deleting the Custom Command and recreating it under the Account HPSIM was installed under.&lt;BR /&gt;&lt;BR /&gt;You might also want to check the passwd file on your CMS Server. c:\Program Files\OpenSSH\etc and verify that there are at least two entries in there, one for Administrator and one for the Account IM was installed in, probably your Domain Admin Account. If there is no entry for Administrator try adding it via the mxagentconfig utility.&lt;BR /&gt;&lt;BR /&gt;I had fun and games with Custom Commands when I created them using my account. Especially where the Event Notification task had the Run Under as my account, once I changed them back to the Domain Admin Account it all worked okay.</description>
      <pubDate>Thu, 04 Mar 2004 16:48:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203607#M1364</guid>
      <dc:creator>Rob Buxton</dc:creator>
      <dc:date>2004-03-04T16:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203608#M1365</link>
      <description>I have verified that my account and the account used to install insight are in the password file. when I run the command, I get an eventlog message:&lt;BR /&gt;&lt;BR /&gt;The description for Event ID ( 0 ) in Source ( sshd ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. The following information is part of the event: sshd : PID 8756 : Received disconnect from 199.199.199.99: 9: The host key supplied was not valid.&lt;BR /&gt;&lt;BR /&gt;I have tried running the command logged in as myself and the account used to do the install.  Both accounts are domain admins. Neither work.</description>
      <pubDate>Fri, 05 Mar 2004 13:24:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203608#M1365</guid>
      <dc:creator>Mark Kempe</dc:creator>
      <dc:date>2004-03-05T13:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203609#M1366</link>
      <description>I would like to see the fix for this eventlog error (sshd).  I am seeing the same error.</description>
      <pubDate>Fri, 05 Mar 2004 14:58:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203609#M1366</guid>
      <dc:creator>Pat Wilson</dc:creator>
      <dc:date>2004-03-05T14:58:13Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203610#M1367</link>
      <description>Well, I've been researching on my own a bit and what I found was that the Custom Commands get the "run-as" username from the user adding the command. But since the SSH Daemon doesn't like "domain\user" logins it fails to execute the command. My solution was to change the username in the database.&lt;BR /&gt;&lt;BR /&gt;I still get the message "The host key supplied was not valid." and I believe that it comes from the initial commands that is run when starting SIM but I haven't been able to find where the default username used when login via SSH is stated.</description>
      <pubDate>Sat, 06 Mar 2004 04:30:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203610#M1367</guid>
      <dc:creator>Daniel Hamberg</dc:creator>
      <dc:date>2004-03-06T04:30:34Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203611#M1368</link>
      <description>Is anyone from HP reading these forums?  I would like to think that if a company is going to include a third party tool to interact so closely with their product they would have better support for it.  It seems that if a program is going to add an entry to the event log then someone should be able to tell me why the entry was made and how to fix it.  Please don't get me wrong, I do appreciate the help I have recieved from the posts above.  I have seen other threads like this one regarding OpenSSH and all of the answers either suggest logging in with the account used to do the install or reload OpenSSH.  Neither have worked in my case.  Can someone "Please" answer these questions:&lt;BR /&gt;&lt;BR /&gt;What process is failing that generates the eventlog message?&lt;BR /&gt;&lt;BR /&gt;What Host Key file is being checked?&lt;BR /&gt;&lt;BR /&gt;Can this Host Key be refreshed or replaced?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;It is becoming critical that I get this process working.  If we can not get it working, my company will have no other choice but to resort to using other third party tools to monitor our HP equipment such as Patrol or Unicenter.  I would prefer to stay with HPSIM but, I, like the rest of you, have a job to do and I am spending way to much time on this issue.&lt;BR /&gt;&lt;BR /&gt;Thank you.</description>
      <pubDate>Mon, 08 Mar 2004 12:40:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203611#M1368</guid>
      <dc:creator>Mark Kempe</dc:creator>
      <dc:date>2004-03-08T12:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203612#M1369</link>
      <description>Mark,&lt;BR /&gt;I can confirm that what you're trying to do will work. That's probably not what you wanted to hear as it points to something awry with your setup.&lt;BR /&gt;&lt;BR /&gt;Here's what I did.&lt;BR /&gt;Set up test.bat using the command you gave.&lt;BR /&gt;I saved this to d:\perl_scripts\test.bat on the CMS Server.&lt;BR /&gt;First I tried setting up the Custom Command while logged in under my account, when running this it failed with the MXAuthentication Error which I cannot get around.&lt;BR /&gt;Note: I only select the CMS Server to run the command against, during the Scheduling part.&lt;BR /&gt;I then deleted the Custom Command.&lt;BR /&gt;I then logged into the account SIM was installed under, recreated the Custom Command as above and reran. This time it worked fine. &lt;BR /&gt;Have you tried logging in to the Server using the SSH Utility (or Putty) if you have it to test OpenSSH is working?&lt;BR /&gt;Maybe try moving the test command away from the root to a specified directory.</description>
      <pubDate>Mon, 08 Mar 2004 14:23:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203612#M1369</guid>
      <dc:creator>Rob Buxton</dc:creator>
      <dc:date>2004-03-08T14:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203613#M1370</link>
      <description>Thanks for the quick reply Rob&lt;BR /&gt;&lt;BR /&gt;From the CMS, logged in as the domain admin account used to install HPSIM and the reinstallation of OpenSSH, I am able to open a command prompt and run ssh.  I supply the username and password for the installation account.  It connects successfully(to itself) and I am able to run the batch job from the command prompt.  I then Exit the ssh.  I opened HPSIM while still logged in and created a new custom command. when I ran the command(against itself) I get the same results "running 0%" status "pending" and an entry in the eveltlog showing "invalid host key" and the task can not be killed.  Back to the same old spot.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 08 Mar 2004 15:56:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203613#M1370</guid>
      <dc:creator>Mark Kempe</dc:creator>
      <dc:date>2004-03-08T15:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203614#M1371</link>
      <description>What account did you log into HPSIM?&lt;BR /&gt;&lt;BR /&gt;I had to create the custom command under the account I installed HPSIM in, not the account in HPSIM I created for myself.&lt;BR /&gt;Just to check, did you limit the number of devices the batch file was to run against?&lt;BR /&gt;&lt;BR /&gt;Also, check that the Administrator User is is the passwd file. When I reinstalled OpenSSH this got removed and I had to add it via the mkpasswd command and update the keys via the mxagentconfig utility.&lt;BR /&gt;&lt;BR /&gt;You might want to try regenerating the OpenSSH Keys for the Domain Account IM was installed in, I cannot recall the exact procedure but it involved renaming some files in the .ssh directory of the home directory and rerunning the mxagentconfig utility for each account.</description>
      <pubDate>Mon, 08 Mar 2004 16:06:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203614#M1371</guid>
      <dc:creator>Rob Buxton</dc:creator>
      <dc:date>2004-03-08T16:06:50Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203615#M1372</link>
      <description>Rob&lt;BR /&gt;I am logged into both the server and HPSIM as the account used to install HPSIM.  The account "Administrator" is not in the passwd file.  I am reading about the Key generator now.  It isn't too clear on what key it is looking for. &lt;BR /&gt;&lt;BR /&gt;Does it want the key from&lt;BR /&gt;&lt;BR /&gt;Insight Manager:&lt;BR /&gt;D:\program files\Systems Insight Manager\config\sshtools\.dtfSshKey&lt;BR /&gt;&lt;BR /&gt;SSH client:&lt;BR /&gt;D:\program files\OpenSSH\etc&lt;BR /&gt;&lt;BR /&gt;or&lt;BR /&gt;&lt;BR /&gt;the user home dir \.ssh\&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 08 Mar 2004 16:17:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203615#M1372</guid>
      <dc:creator>Mark Kempe</dc:creator>
      <dc:date>2004-03-08T16:17:36Z</dc:date>
    </item>
    <item>
      <title>Re: Custom Commands</title>
      <link>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203616#M1373</link>
      <description>Get hold of the Readme file to double check what I'm saying, but I found that not having the Administrator account is required.&lt;BR /&gt;&lt;BR /&gt;Use the mxpasswd to generate a Local Administrator Account in the passwd file.&lt;BR /&gt;&lt;BR /&gt;Then from a command prompt on the SIM Server, run mxagentconfig and enter the Local Administrator Account and Password.&lt;BR /&gt;&lt;BR /&gt;This should generate the .ssh directory and key files in this under the home directory, by default that should be c:\documents and settings\administrator.&lt;BR /&gt;&lt;BR /&gt;If, like me, you've reinstalled OpenSSH, this account doesn't get regenerated in the SSH Structure and does seem to be required.&lt;BR /&gt;It fixed a couple of demons for me.</description>
      <pubDate>Mon, 08 Mar 2004 16:29:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/server-management-systems/custom-commands/m-p/3203616#M1373</guid>
      <dc:creator>Rob Buxton</dc:creator>
      <dc:date>2004-03-08T16:29:24Z</dc:date>
    </item>
  </channel>
</rss>

