4 4 3:Creating a Command Event: Difference between revisions

From SEPsesam
(Prepared for translation.)
(Marked this version for translation)
Line 1: Line 1:
<languages /><translate>{{Copyright SEP AG|en}}</translate>
<languages /><translate><!--T:1-->
{{Copyright SEP AG|en}}</translate>
{{draft}}
{{draft}}
<translate>{{Navigation_latest|release=4.4.3|link=[[SEP_sesam_Documentation#Previous_versions|Documentation archive]]}}</translate><br />
<translate><!--T:2-->
<translate>==Overview==</translate>
{{Navigation_latest|release=4.4.3|link=[[SEP_sesam_Documentation#Previous_versions|Documentation archive]]}}</translate><br />
<div class="boilerplate metadata" id="Additional resources" style="background-color:#ecedf1; color:#8695a7; border: 1px ridge #cdd3db; margin: 0.5em; padding: 0.5em; float: right; width: 25%; "><center><b><translate>Additional resources</translate></b></center>
<translate>==Overview== <!--T:3--></translate>
<div class="boilerplate metadata" id="Additional resources" style="background-color:#ecedf1; color:#8695a7; border: 1px ridge #cdd3db; margin: 0.5em; padding: 0.5em; float: right; width: 25%; "><center><b><translate><!--T:4-->
Additional resources</translate></b></center>
{|style="margin: auto; margin-bottom:1em; width:100%; border:0px solid grey;"
{|style="margin: auto; margin-bottom:1em; width:100%; border:0px solid grey;"
| rowspan="2" style="padding:0px 10px 0px;" | <translate>[[File:SEP_next.png|45px|link=About_Scheduling]]</translate>
| rowspan="2" style="padding:0px 10px 0px;" | <translate><!--T:5-->
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate>See also:
[[File:SEP_next.png|45px|link=About_Scheduling]]</translate>
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate><!--T:6-->
See also:
[[Special:MyLanguage/Follow-up_Events|Creating Follow-up Events]] – [[Special:MyLanguage/Creating a Schedule|Creating a Schedule]] – [[Special:MyLanguage/About_Scheduling|About Scheduling]]</translate>
[[Special:MyLanguage/Follow-up_Events|Creating Follow-up Events]] – [[Special:MyLanguage/Creating a Schedule|Creating a Schedule]] – [[Special:MyLanguage/About_Scheduling|About Scheduling]]</translate>
|}
|}


{|style="margin: auto; margin-bottom:1em; width:100%; border:0px solid grey;"
{|style="margin: auto; margin-bottom:1em; width:100%; border:0px solid grey;"
| rowspan="2" style="padding:0px 10px 0px;" | <translate>[[File:SEP Tip.png|45px|link=Special:MyLanguage/FAQ|FAQ]]</translate>
| rowspan="2" style="padding:0px 10px 0px;" | <translate><!--T:7-->
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate>Check [[Special:MyLanguage/FAQ|FAQ]] to find the answers to most common questions.</translate>
[[File:SEP Tip.png|45px|link=Special:MyLanguage/FAQ|FAQ]]</translate>
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate><!--T:8-->
Check [[Special:MyLanguage/FAQ|FAQ]] to find the answers to most common questions.</translate>
|}
|}


{|style="margin: auto; margin-bottom:1em; width:100%; border:0px solid grey;"
{|style="margin: auto; margin-bottom:1em; width:100%; border:0px solid grey;"
| rowspan="2" style="padding:0px 10px 0px;" | <translate>[[File:SEP Troubleshooting.png|45px|link=Special:MyLanguage/Troubleshooting_Guide|Troubleshooting Guide]]</translate>
| rowspan="2" style="padding:0px 10px 0px;" | <translate><!--T:9-->
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;"|<translate>Problems? See [[Special:MyLanguage/Troubleshooting_Guide#Backup_problems| SEP sesam Troubleshooting Guide]].</translate>
[[File:SEP Troubleshooting.png|45px|link=Special:MyLanguage/Troubleshooting_Guide|Troubleshooting Guide]]</translate>
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;"|<translate><!--T:10-->
Problems? See [[Special:MyLanguage/Troubleshooting_Guide#Backup_problems| SEP sesam Troubleshooting Guide]].</translate>
|}</div>
|}</div>


<translate>A command event allows the '''execution of an arbitrary program''' on a SEP sesam Client. As of ''SEP sesam version 4.4.2'', new command events can be '''scheduled''' to run automatically.
<translate><!--T:11-->
A command event allows the '''execution of an arbitrary program''' on a SEP sesam Client. As of ''SEP sesam version 4.4.2'', new command events can be '''scheduled''' to run automatically.


==Steps==</translate>
==Steps== <!--T:12--></translate>


<ol><li><translate>In the '''Main Selection''' -> '''Scheduling''' -> '''Schedules''', select the schedule to which you would like to add a command event. Right-click it and select '''New command event'''. (If you have not configured a schedule yet, you have to configure it first by clicking the '''New schedule''' button in the ''Schedules'' window. For details, see [[Special:MyLanguage/Creating_a_Schedule| Creating a Schedule]].)</translate> </li>
<ol><li><translate><!--T:13-->
In the '''Main Selection''' -> '''Scheduling''' -> '''Schedules''', select the schedule to which you would like to add a command event. Right-click it and select '''New command event'''. (If you have not configured a schedule yet, you have to configure it first by clicking the '''New schedule''' button in the ''Schedules'' window. For details, see [[Special:MyLanguage/Creating_a_Schedule| Creating a Schedule]].)</translate> </li>
[[image:new_command_event.png|left|link=]]
[[image:new_command_event.png|left|link=]]
<br clear=all>
<br clear=all>
<li><translate>The ''New command event'' window is displayed. You can review the selected schedule parameters by clicking the '''Parameter''' tab where the following options can be defined:</translate>
<li><translate><!--T:14-->
<ul><li><translate>'''Priority:''' optionally define a priority for the command event. SEPuler always executes schedules with the highest priority first. The default priority level is 1, which is the lowest priority. The highest priority level is 99. The only exceptions are schedules with priority 0, which override all other priorities and are always executed. For details, see [[The SEPuler - an event calendar 4.4|SEPuler]].</translate></li>
The ''New command event'' window is displayed. You can review the selected schedule parameters by clicking the '''Parameter''' tab where the following options can be defined:</translate>
<li> <translate>'''Blocking date:''' optionally this is used together with high priority for special events. If checked, it will block events of the same type of a lower priority, ensuring that the command event is processed when other command events are also scheduled at the same time.</translate></li>
<ul><li><translate><!--T:15-->
<li><translate>'''Name:''' enter a name for the new event or search for and select an already existing command event. Searching for command opens a new window, where you can add a new command event, copy an already existing command event, select which existing command event you want to use again by clicking the '''Choose''' button, and delete an existing command event.</translate></li>
'''Priority:''' optionally define a priority for the command event. SEPuler always executes schedules with the highest priority first. The default priority level is 1, which is the lowest priority. The highest priority level is 99. The only exceptions are schedules with priority 0, which override all other priorities and are always executed. For details, see [[The SEPuler - an event calendar 4.4|SEPuler]].</translate></li>
<translate>[[image:select_command.png|left|link=]]</translate>
<li> <translate><!--T:16-->
'''Blocking date:''' optionally this is used together with high priority for special events. If checked, it will block events of the same type of a lower priority, ensuring that the command event is processed when other command events are also scheduled at the same time.</translate></li>
<li><translate><!--T:17-->
'''Name:''' enter a name for the new event or search for and select an already existing command event. Searching for command opens a new window, where you can add a new command event, copy an already existing command event, select which existing command event you want to use again by clicking the '''Choose''' button, and delete an existing command event.</translate></li>
<translate><!--T:18-->
[[image:select_command.png|left|link=]]</translate>
<br clear=all>
<br clear=all>
<li><translate>'''Client:''' select the client on which the command will be executed.</translate></li>
<li><translate><!--T:19-->
<li><translate>'''User:''' enter the user name of a user with sufficient access to execute the command on the client.</translate></li>
'''Client:''' select the client on which the command will be executed.</translate></li>
<li><translate>'''Command:''' enter the complete command and parameters if necessary, e.g., <tt>eventlog.ps</tt>.</translate></li></ul></li>
<li><translate><!--T:20-->
<li><translate>Click '''OK''' to add your command task to a schedule. You can review your schedules and assigned events, trigger immediate start of events or delete them by right-clicking the selected schedule.</translate></li></ol>
'''User:''' enter the user name of a user with sufficient access to execute the command on the client.</translate></li>
<li><translate><!--T:21-->
'''Command:''' enter the complete command and parameters if necessary, e.g., <tt>eventlog.ps</tt>.</translate></li></ul></li>
<li><translate><!--T:22-->
Click '''OK''' to add your command task to a schedule. You can review your schedules and assigned events, trigger immediate start of events or delete them by right-clicking the selected schedule.</translate></li></ol>


{{<translate>tip</translate>|
{{<translate><!--T:23-->
<translate>You can also access the configured commands from the ''Menu Bar'' -> '''Configuration''' -> '''Command'''.</translate>}}
tip</translate>|
<translate><!--T:24-->
You can also access the configured commands from the ''Menu Bar'' -> '''Configuration''' -> '''Command'''.</translate>}}


<translate>=={{anchor|permission}}Setting permission to execute commands==
<translate>=={{anchor|permission}}Setting permission to execute commands== <!--T:25-->


<!--T:26-->
Not every user on a specific client is authorized to execute all commands. Without additional entries authorizing selected users to run specific commands, the commands can only be run from the <code><SESAM_ROOT>/bin/sesam</code> system directory. For a command to be executed from another directory before the regular backup starts, permissions must be granted by the target client.</translate>
Not every user on a specific client is authorized to execute all commands. Without additional entries authorizing selected users to run specific commands, the commands can only be run from the <code><SESAM_ROOT>/bin/sesam</code> system directory. For a command to be executed from another directory before the regular backup starts, permissions must be granted by the target client.</translate>


;UNIX
;UNIX


<translate>Copy the file <tt>sesam_cmdusers.allow</tt> from the {{Sesamroot|/skel}} directory to {{Path|/etc}} on the client and modify the file. You will now be able to enter a line for the user and command using the {<tt>User</tt>} {<tt>command</tt>} format. If you use a wildcard (<tt>*</tt>), all commands will be executed.
<translate><!--T:27-->
Copy the file <tt>sesam_cmdusers.allow</tt> from the {{Sesamroot|/skel}} directory to {{Path|/etc}} on the client and modify the file. You will now be able to enter a line for the user and command using the {<tt>User</tt>} {<tt>command</tt>} format. If you use a wildcard (<tt>*</tt>), all commands will be executed.
   
   
No explicit permissions are required to execute SEP sesam commands such as <tt>sm_loader</tt>.</translate>
No explicit permissions are required to execute SEP sesam commands such as <tt>sm_loader</tt>.</translate>
Line 53: Line 77:
;Windows
;Windows


<translate>To set access rights for the user and command, use the following key:</translate> <tt>HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\CommandEvents\{user}\{command}</tt>. <translate>Also, the entry <tt>CTRLD_Path='''ID'''/bin/sesam;'''ID'''/bin/sms</tt> of the file <tt>ID/var/ini/sm.ini</tt> must be extended to include the directories where the desired programs reside.</translate>
<translate><!--T:28-->
To set access rights for the user and command, use the following key:</translate> <tt>HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\CommandEvents\{user}\{command}</tt>. <translate><!--T:29-->
Also, the entry <tt>CTRLD_Path='''ID'''/bin/sesam;'''ID'''/bin/sms</tt> of the file <tt>ID/var/ini/sm.ini</tt> must be extended to include the directories where the desired programs reside.</translate>


# <translate>Open the Regedit editor.</translate>
# <translate><!--T:30-->
# <translate>Go to <tt>HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\</tt> and create a new key called <tt>CommandEvents</tt>. If it does not already exist, right click and select "New Key".</translate>
Open the Regedit editor.</translate>
# <translate>Enter {user} and then {command} with the full path information as the key.</translate>
# <translate><!--T:31-->
Go to <tt>HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\</tt> and create a new key called <tt>CommandEvents</tt>. If it does not already exist, right click and select "New Key".</translate>
# <translate><!--T:32-->
Enter {user} and then {command} with the full path information as the key.</translate>


<translate>The available commands are:
<translate><!--T:33-->
The available commands are:


  *                all commands
  <!--T:34-->
*                all commands
  specific command  this command only
  specific command  this command only
  cmd /c            all DOS commands ( dir, etc. )
  cmd /c            all DOS commands ( dir, etc. )
  DOS-Command      this command only
  DOS-Command      this command only


<!--T:35-->
If there are any other commands present, the last command will be executed. If you use a wildcard (<tt>*</tt>), all commands will be executed.
If there are any other commands present, the last command will be executed. If you use a wildcard (<tt>*</tt>), all commands will be executed.


<!--T:36-->
[[Image:Registryentry.JPG]]</translate>
[[Image:Registryentry.JPG]]</translate>
<br clear=all>
<br clear=all>


<translate>Below is an example of a registry file (*.reg) that allows all command events for the ''administrator'' and ''sesam'' user:</translate>
<translate><!--T:37-->
Below is an example of a registry file (*.reg) that allows all command events for the ''administrator'' and ''sesam'' user:</translate>
  Windows Registry Editor Version 5.00
  Windows Registry Editor Version 5.00
  [HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\CommandEvents\sesam\*]
  [HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\CommandEvents\sesam\*]
  [HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\CommandEvents\Administrator\*]
  [HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\CommandEvents\Administrator\*]
  {{<translate>note</translate>|
  {{<translate><!--T:38-->
<translate>The most common errors when setting up the desired user permissions and allowed commands are:
note</translate>|
<translate><!--T:39-->
The most common errors when setting up the desired user permissions and allowed commands are:
* The necessary entries are not entered in the target client directories, not entered on the server or are entered incorrectly.
* The necessary entries are not entered in the target client directories, not entered on the server or are entered incorrectly.
* Instead of entering a command as a key, it is entered as a character string.</translate>     
* Instead of entering a command as a key, it is entered as a character string.</translate>     
}}
}}


<translate>==See also==
<translate>==See also== <!--T:40-->
[[Special:MyLanguage/Follow-up_Events|Creating Follow-up Events]] – [[Special:MyLanguage/Creating a Schedule|Creating a Schedule]] – [[Special:MyLanguage/About_Scheduling|About Scheduling]]</translate>
[[Special:MyLanguage/Follow-up_Events|Creating Follow-up Events]] – [[Special:MyLanguage/Creating a Schedule|Creating a Schedule]] – [[Special:MyLanguage/About_Scheduling|About Scheduling]]</translate>

Revision as of 08:26, 14 August 2017

Other languages:

Copyright © SEP AG 1999-2024. All rights reserved.

Any form of reproduction of the contents or parts of this manual is allowed only with the express written permission from SEP AG. When compiling and designing user documentation SEP AG uses great diligence and attempts to deliver accurate and correct information. However, SEP AG cannot issue a guarantee for the contents of this manual.

Draft.png WORK IN PROGRESS
This article is in the initial stage and may be updated, replaced or deleted at any time. It is inappropriate to use this document as reference material as it is a work in progress and should be treated as such.
Docs latest icon.png Welcome to the latest SEP sesam documentation version 4.4.3. For previous documentation version(s), check Documentation archive.


Overview

A command event allows the execution of an arbitrary program on a SEP sesam Client. As of SEP sesam version 4.4.2, new command events can be scheduled to run automatically.

Steps

  1. In the Main Selection -> Scheduling -> Schedules, select the schedule to which you would like to add a command event. Right-click it and select New command event. (If you have not configured a schedule yet, you have to configure it first by clicking the New schedule button in the Schedules window. For details, see Creating a Schedule.)
  2. New command event.png


  3. The New command event window is displayed. You can review the selected schedule parameters by clicking the Parameter tab where the following options can be defined:
    • Priority: optionally define a priority for the command event. SEPuler always executes schedules with the highest priority first. The default priority level is 1, which is the lowest priority. The highest priority level is 99. The only exceptions are schedules with priority 0, which override all other priorities and are always executed. For details, see SEPuler.
    • Blocking date: optionally this is used together with high priority for special events. If checked, it will block events of the same type of a lower priority, ensuring that the command event is processed when other command events are also scheduled at the same time.
    • Name: enter a name for the new event or search for and select an already existing command event. Searching for command opens a new window, where you can add a new command event, copy an already existing command event, select which existing command event you want to use again by clicking the Choose button, and delete an existing command event.
    • Select command.png


    • Client: select the client on which the command will be executed.
    • User: enter the user name of a user with sufficient access to execute the command on the client.
    • Command: enter the complete command and parameters if necessary, e.g., eventlog.ps.
  4. Click OK to add your command task to a schedule. You can review your schedules and assigned events, trigger immediate start of events or delete them by right-clicking the selected schedule.
SEP Tip.png Tip

You can also access the configured commands from the Menu Bar -> Configuration -> Command.

Setting permission to execute commands

Not every user on a specific client is authorized to execute all commands. Without additional entries authorizing selected users to run specific commands, the commands can only be run from the <SESAM_ROOT>/bin/sesam system directory. For a command to be executed from another directory before the regular backup starts, permissions must be granted by the target client.

UNIX

Copy the file sesam_cmdusers.allow from the <SESAM_ROOT>/skel directory to /etc on the client and modify the file. You will now be able to enter a line for the user and command using the {User} {command} format. If you use a wildcard (*), all commands will be executed.

No explicit permissions are required to execute SEP sesam commands such as sm_loader.

Windows

To set access rights for the user and command, use the following key: HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\CommandEvents\{user}\{command}. Also, the entry CTRLD_Path=ID/bin/sesam;ID/bin/sms of the file ID/var/ini/sm.ini must be extended to include the directories where the desired programs reside.

  1. Open the Regedit editor.
  2. Go to HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\ and create a new key called CommandEvents. If it does not already exist, right click and select "New Key".
  3. Enter {user} and then {command} with the full path information as the key.

The available commands are:

*                 all commands
specific command  this command only
cmd /c            all DOS commands ( dir, etc. )
DOS-Command       this command only

If there are any other commands present, the last command will be executed. If you use a wildcard (*), all commands will be executed.

Registryentry.JPG

Below is an example of a registry file (*.reg) that allows all command events for the administrator and sesam user:

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\CommandEvents\sesam\*]
[HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\CommandEvents\Administrator\*]

Information sign.png Note

The most common errors when setting up the desired user permissions and allowed commands are:

  • The necessary entries are not entered in the target client directories, not entered on the server or are entered incorrectly.
  • Instead of entering a command as a key, it is entered as a character string.

See also

Creating Follow-up EventsCreating a ScheduleAbout Scheduling