5 0 0:Creating a Command Event: Difference between revisions
mNo edit summary |
m (Testing transclusion) |
||
(19 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude><languages /></noinclude> | |||
<noinclude><translate> | <noinclude><translate> | ||
<div class="noprint" | <!--T:1--> | ||
{{Copyright SEP AG|en | <div class="noprint"> | ||
{{Copyright SEP AG|en}} | |||
< | <!--T:2--> | ||
<translate>===Overview===</translate> | {{Navigation_latest|release=[[SEP_sesam_Release_Versions|5.0.0 ''Jaglion'']]|link=[[Special:MyLanguage/4_4_3:Creating_a_Command_Event|Command events in ≤ 4.4.3 ''Beefalo V2'']]}}</translate><br /></div> | ||
<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> | <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> | 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=Special:MyLanguage/About_Scheduling]]</translate> | | rowspan="2" style="padding:0px 10px 0px;" | <translate><!--T:5--> [[File:SEP_next.png|45px|link=Special:MyLanguage/About_Scheduling]]</translate> | ||
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate>See also: | | 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> | ||
|} | |} | ||
Line 17: | Line 21: | ||
| rowspan="2" style="padding:0px 10px 0px;" | [[File:SEP Tip.png|45px|link=Special:MyLanguage/FAQ|FAQ]] | | rowspan="2" style="padding:0px 10px 0px;" | [[File:SEP Tip.png|45px|link=Special:MyLanguage/FAQ|FAQ]] | ||
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate> | | style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | <translate> | ||
<!--T:7--> | |||
Check [[Special:MyLanguage/FAQ|FAQ]] to find the answers to most common questions.</translate> | Check [[Special:MyLanguage/FAQ|FAQ]] to find the answers to most common questions.</translate> | ||
|} | |} | ||
Line 22: | Line 27: | ||
{|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;" | [[File:SEP Troubleshooting.png|45px|link=Special:MyLanguage/Troubleshooting_Guide|Troubleshooting Guide]] | | rowspan="2" style="padding:0px 10px 0px;" | [[File:SEP Troubleshooting.png|45px|link=Special:MyLanguage/Troubleshooting_Guide|Troubleshooting Guide]] | ||
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;"|<translate>Problems? See [[Special:MyLanguage/Troubleshooting_Guide| SEP sesam Troubleshooting Guide]].</translate> | | style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;"|<translate><!--T:8--> Problems? See [[Special:MyLanguage/Troubleshooting_Guide| SEP sesam Troubleshooting Guide]].</translate> | ||
|}</div></noinclude> | |}</div></noinclude> | ||
<translate>A command event enables the execution of any program on a [[Special:MyLanguage/SEP_sesam_Glossary#SBC|SEP sesam Client]]. | <translate><!--T:9--> | ||
A command event enables the execution of any program on a [[Special:MyLanguage/SEP_sesam_Glossary#SBC|SEP sesam Client]]. A user must be authorized to run the commands on a specific client. By default, only commands entered in the system directory at <code><SESAM_ROOT>/bin/sesam</code> can be executed. If you want to allow starting commands in other directories, see the section [[Special:MyLanguage/5_0_0:Creating_a_Command_Event#permission|Setting permission to run commands]]. | |||
<!--T:10--> | |||
In the SEP sesam GUI, you can [[Special:MyLanguage/5_0_0:Creating_a_Command_Event#permissions|start command events immediately]] or schedule the events for automatic execution. | |||
====Steps==== <!--T:11--> | |||
<!--T:12--> | |||
To create a new command event, follow the steps below:</translate> | To create a new command event, follow the steps below:</translate> | ||
<ol><li><translate>From '''Main Selection''' -> '''Scheduling''' -> '''Schedules''', select the schedule to which you want to add a command event. | <ol><li><translate><!--T:13--> From '''Main Selection''' -> '''Scheduling''' -> '''Schedules''', select the [[Special:MyLanguage/Creating a Schedule|schedule]] to which you want to add a command event. Then right-click the desired schedule and select '''New Command Event'''. The ''New Command Event'' window is displayed.</translate></li> | ||
<translate>Note that if you have not already configured a schedule, you must first configure it by clicking the '''New Schedule''' button in the ''Schedules'' window. For details, see [[Special:MyLanguage/Creating_a_Schedule|Creating a Schedule]].</translate> | <translate><!--T:14--> Note that if you have not already configured a schedule, you must first configure it by clicking the '''New Schedule''' button in the ''Schedules'' window. For details, see [[Special:MyLanguage/Creating_a_Schedule|Creating a Schedule]].</translate> | ||
<li><translate>Under the '''Parameter''' tab, specify the following settings:</translate></li | <li><translate><!--T:15--> Under the '''Parameter''' tab, specify the following settings:</translate></li> | ||
<ul><li><translate><!--T:16--> '''''Priority''''': Optionally, define a priority for the command event. SEPuler always executes schedules with higher priority first. The default priority level is 1, which is the lowest priority (the highest is 99). The highest priority level is 99. The only exception is schedules with priority 0, which override all other priorities and are always executed. For details, see [[Special:MyLanguage/4_4_3_Beefalo:SEPuler_-_an_event_calendar#event_priority|Event Priority]].</translate></li> | |||
<li> <translate><!--T:17--> '''''Blocking date''''': This should be used in conjunction with high priority for special events. When this check box is selected, lower priority events of the same type are blocked, ensuring that the command event is processed if other command events are also scheduled at the same time. See [[Special:MyLanguage/4_4_3_Beefalo:SEPuler_-_an_event_calendar#blocking_events|Blocking Events]].</translate></li> | |||
<ul><li><translate>'''''Priority''''': Optionally, define a priority for the command event. SEPuler always executes schedules with higher priority first. The default priority level is 1, which is the lowest priority (the highest is 99). The highest priority level is 99. The only exception is schedules with priority 0, which override all other priorities and are always executed. For details, see [[Special:MyLanguage/4_4_3_Beefalo:SEPuler_-_an_event_calendar#event_priority|Event Priority]].</translate></li> | <li><translate><!--T:18--> '''''Name''''': Select the name of the existing command from the drop-down list. When selected, the full command is displayed in the ''Preview'' field below.</translate></li> | ||
<li> <translate>'''''Blocking date''''': This should be used in conjunction with high priority for special events. When this check box is selected, lower priority events of the same type are blocked, ensuring that the command event is processed if other command events are also scheduled at the same time. See [[Special:MyLanguage/4_4_3_Beefalo:SEPuler_-_an_event_calendar#blocking_events|Blocking Events]].</translate></li> | {{<translate><!--T:19--> tip</translate>|<translate><!--T:20--> You can access the configured commands from the ''menu bar'' -> ''Configuration'' -> ''Command''. You can define your own commands to use when creating a command event, and modify, delete, or copy the existing commands. For details, see [[Special:MyLanguage/4_4_3_Beefalo:Configuration#command|Configuration: Commands]].</translate>}} | ||
<li><translate>'''''Name''''': Select | <li><translate><!--T:21--> '''''Client''''': Select a client on which to execute the command.</translate></li> | ||
{{<translate>tip</translate>|<translate>You can access the configured commands from the ''menu bar'' -> ''Configuration'' -> ''Command''. You can define your own commands to use when creating a command event, and modify, delete, or copy the existing commands. For details, see [[Special:MyLanguage/4_4_3_Beefalo:Configuration#command|Configuration: Commands]].</translate>}} | <li><translate><!--T:22--> '''''User''''': Enter the user name of a user who has sufficient rights to execute the command on the client.</translate></li> | ||
<li><translate>'''''Client''''': Select a client on which to execute the command.</translate></li> | <li><translate><!--T:23--> '''''Retention time''''': Specify how long (in days) to retain the command event results and logs (default 30).</translate></li> | ||
<li><translate>'''''User''''': Enter the user name of a user who has sufficient rights to execute the command on the client.</translate></li> | <li><translate><!--T:24--> '''''Additional Parameter''''': Optionally add additional parameters to the command.</translate></li> | ||
<li><translate>'''''Retention time''''': Specify how long (in days) to retain the command event results and logs (default 30).</translate></li> | <li><translate><!--T:25--> '''''Follow up''''' (available in v. ≥ 5.0.0 ''Jaglion''): Optionally use this field to configure a follow up event to be started on the SEP sesam Server once the command event has completed. For details, see [[Special:MyLanguage/Follow-up_Events|Creating Follow-up Events]].</translate></li> | ||
<li><translate>'''''Additional Parameter''''': Optionally add additional parameters to the command | <translate><!--T:26--> [[image:New_command_event_Jaglion.jpg|740px|link=]]</translate> | ||
<li><translate>'''''Follow up''''' (available in v. ≥ 5.0.0 ''Jaglion''): Optionally use this field to configure a follow up event to be started on the SEP sesam Server once the command event has completed. For details, see [[Special:MyLanguage/Follow-up_Events|Creating Follow-up Events]].</translate></li></ul> | <br clear=all></ul> | ||
<li><translate>Click '''OK''' to add your command event to a schedule. You can review your schedules and assigned events, trigger events to start immediately, or delete them by right-clicking the selected schedule/event.</translate></li></ol> | <li><translate><!--T:27--> Click '''OK''' to add your command event to a schedule. You can review your schedules and assigned events, trigger events to start immediately, or delete them by right-clicking the selected schedule/event.</translate></li></ol> | ||
<translate>==={{anchor|permission}}Setting permission to run commands=== | <translate>==={{anchor|permission}}Setting permission to run commands=== <!--T:28--> | ||
<!--T:29--> | |||
Not every user on a specific client is authorized to run all commands. Without additional entries authorizing selected users to run certain commands, commands can only be run from the system directory <code><SESAM_ROOT>/bin/sesam</code>. If a command is to be started from another directory before the regular backup is started, this must be entered/allowed on the target client.</translate> | Not every user on a specific client is authorized to run all commands. Without additional entries authorizing selected users to run certain commands, commands can only be run from the system directory <code><SESAM_ROOT>/bin/sesam</code>. If a command is to be started from another directory before the regular backup is started, this must be entered/allowed on the target client.</translate> | ||
;UNIX | ;UNIX | ||
<translate>Copy the file <tt>sesam_cmdusers.allow</tt> from the directory {{Sesamroot|/skel}} to {{Path|/etc}} on the client and modify the file. You can now enter a line for the user and the command in the format <tt>{user} {command}</tt>. If you use a wildcard (<tt>*</tt>), all commands will be executed. | <translate><!--T:30--> | ||
Copy the file <tt>sesam_cmdusers.allow</tt> from the directory {{Sesamroot|/skel}} to {{Path|/etc}} on the client and modify the file. You can now enter a line for the user and the command in the format <tt>{user} {command}</tt>. 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 58: | Line 70: | ||
;Windows | ;Windows | ||
<translate>To set access rights for the user and command, use the following key:</translate> {{Path|\\HKLM\SOFTWARE\SEP Elektronik GmbH\sesam\CommandEvents\<translate><user></translate>\<translate><command></translate>}} | <translate><!--T:31--> To set access rights for the user and command, use the following key:</translate> {{Path|\\HKLM\SOFTWARE\SEP Elektronik GmbH\sesam\CommandEvents\<translate><!--T:32--> <user></translate>\<translate><!--T:33--> <command></translate>}} | ||
<translate>In addition, on the client computer, the entry <tt>CTRLD_Path='''ID'''/bin/sesam;'''ID'''/bin/sms</tt> in the file <tt>'''ID'''/var/ini/sm.ini</tt> in the section <tt>[CTRLD_Server]</tt> must be extended to include the directories in which the desired programs are located.</translate> | <translate><!--T:34--> In addition, on the client computer, the entry <tt>CTRLD_Path='''ID'''/bin/sesam;'''ID'''/bin/sms</tt> in the file <tt>'''ID'''/var/ini/sm.ini</tt> in the section <tt>[CTRLD_Server]</tt> must be extended to include the directories in which the desired programs are located.</translate> | ||
# <translate>Open the Regedit editor.</translate> | # <translate><!--T:35--> Open the Regedit editor.</translate> | ||
# <translate>Go to <tt>HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\</tt> and create a new key named <tt>CommandEvents</tt>. If it does not already exist, right click and select '''New Key'''.</translate> | # <translate><!--T:36--> Go to <tt>HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\</tt> and create a new key named <tt>CommandEvents</tt>. If it does not already exist, right click and select '''New Key'''.</translate> | ||
# <translate>Enter <user> and then <command> with the full path information as the key.</translate> | # <translate><!--T:37--> Enter <user> and then <command> with the full path information as the key.</translate> | ||
<translate>The available commands are:</translate> | <translate><!--T:38--> The available commands are:</translate> | ||
{| border="2" cellpadding="4" cellspacing="0" style="width:60%; margin: 1em 1em 1em 0; background: #fcfcfc; border: 1px #aaa solid; border-collapse: collapse;" | {| border="2" cellpadding="4" cellspacing="0" style="width:60%; margin: 1em 1em 1em 0; background: #fcfcfc; border: 1px #aaa solid; border-collapse: collapse;" | ||
|- style="background:#FFCC01; color:#002F55" | |- style="background:#FFCC01; color:#002F55" | ||
! scope="col" |<translate>Command</translate> | ! scope="col" |<translate><!--T:39--> Command</translate> | ||
! scope="col" |<translate>Execution</translate> | ! scope="col" |<translate><!--T:40--> Execution</translate> | ||
|- | |- | ||
|style="text-align: center;"|*|| style="text-align: center;"| <translate>all | |style="text-align: center;"|*|| style="text-align: center;"| <translate><!--T:41--> all commands</translate> | ||
|- | |- | ||
|style="text-align: center;"|<tt>cmd /c</tt>|| style="text-align: center;" |<translate>all DOS commands (<tt>dir</tt>, etc.)</translate> | |style="text-align: center;"|<tt>cmd /c</tt>|| style="text-align: center;" |<translate><!--T:42--> all DOS commands (<tt>dir</tt>, etc.)</translate> | ||
|- | |- | ||
|style="text-align: center;"|<tt>DOS command (e.g., <tt>dir</tt>)</tt>|| style="text-align: center;" |<translate> | |style="text-align: center;"|<tt>DOS command (e.g., <tt>dir</tt>)</tt>|| style="text-align: center;" |<translate><!--T:43--> specific DOS command only (e.g., <tt>dir</tt>)</translate> | ||
|- | |- | ||
|style="text-align: center;"|<tt>specific command (e.g., <tt>ping</tt>)</tt>|| style="text-align: center;"| <translate> | |style="text-align: center;"|<tt>specific command (e.g., <tt>ping</tt>)</tt>|| style="text-align: center;"| <translate><!--T:44--> specific command only (e.g., <tt>ping</tt>)</translate> | ||
|- | |- | ||
|} | |} | ||
<translate>If there are other commands, the last command is executed. If you use a wildcard (<tt>*</tt>), all commands are executed. | <translate><!--T:45--> | ||
If there are other commands, the last command is executed. If you use a wildcard (<tt>*</tt>), all commands are executed. | |||
<!--T:46--> | |||
[[Image:Registryentry.JPG|link=]]</translate> | [[Image:Registryentry.JPG|link=]]</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 the ''sesam'' user:</translate> | <translate><!--T:47--> Below is an example of a registry file (*.reg) that allows all command events for the ''administrator'' and the ''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><noinclude><div class="noprint"> | {{<translate><!--T:48--> note</translate>|<translate><!--T:49--> The most common errors when setting up the desired user permissions and allowed commands are:</translate> | ||
===See also=== | *<translate><!--T:50--> The necessary entries are not entered in the directories of the target clients, are not entered on the server, or are entered incorrectly.</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><!--T:51--> | ||
Instead of entering a command as a key, it is entered as a string.</translate>}} | |||
<noinclude><div class="noprint"> | |||
<translate>===See also=== <!--T:52--> | |||
[[Special:MyLanguage/Follow-up_Events|Creating Follow-up Events]] – [[Special:MyLanguage/Creating a Schedule|Creating a Schedule]] – [[Special:MyLanguage/About_Scheduling|About Scheduling]]</translate></div></noinclude> |
Revision as of 14:34, 3 June 2022
Overview
A command event enables the execution of any program on a SEP sesam Client. A user must be authorized to run the commands on a specific client. By default, only commands entered in the system directory at <SESAM_ROOT>/bin/sesam
can be executed. If you want to allow starting commands in other directories, see the section Setting permission to run commands.
In the SEP sesam GUI, you can start command events immediately or schedule the events for automatic execution.
Steps
To create a new command event, follow the steps below:
- From Main Selection -> Scheduling -> Schedules, select the schedule to which you want to add a command event. Then right-click the desired schedule and select New Command Event. The New Command Event window is displayed. Note that if you have not already configured a schedule, you must first configure it by clicking the New Schedule button in the Schedules window. For details, see Creating a Schedule.
- Under the Parameter tab, specify the following settings:
- Priority: Optionally, define a priority for the command event. SEPuler always executes schedules with higher priority first. The default priority level is 1, which is the lowest priority (the highest is 99). The highest priority level is 99. The only exception is schedules with priority 0, which override all other priorities and are always executed. For details, see Event Priority.
- Blocking date: This should be used in conjunction with high priority for special events. When this check box is selected, lower priority events of the same type are blocked, ensuring that the command event is processed if other command events are also scheduled at the same time. See Blocking Events.
- Name: Select the name of the existing command from the drop-down list. When selected, the full command is displayed in the Preview field below.
- Client: Select a client on which to execute the command.
- User: Enter the user name of a user who has sufficient rights to execute the command on the client.
- Retention time: Specify how long (in days) to retain the command event results and logs (default 30).
- Additional Parameter: Optionally add additional parameters to the command.
- Follow up (available in v. ≥ 5.0.0 Jaglion): Optionally use this field to configure a follow up event to be started on the SEP sesam Server once the command event has completed. For details, see Creating Follow-up Events.
- Click OK to add your command event to a schedule. You can review your schedules and assigned events, trigger events to start immediately, or delete them by right-clicking the selected schedule/event.
Tip | |
You can access the configured commands from the menu bar -> Configuration -> Command. You can define your own commands to use when creating a command event, and modify, delete, or copy the existing commands. For details, see Configuration: Commands. |
Setting permission to run commands
Not every user on a specific client is authorized to run all commands. Without additional entries authorizing selected users to run certain commands, commands can only be run from the system directory <SESAM_ROOT>/bin/sesam
. If a command is to be started from another directory before the regular backup is started, this must be entered/allowed on the target client.
- UNIX
Copy the file sesam_cmdusers.allow from the directory <SESAM_ROOT>/skel
to /etc
on the client and modify the file. You can now enter a line for the user and the command in the format {user} {command}. 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: \\HKLM\SOFTWARE\SEP Elektronik GmbH\sesam\CommandEvents\<user>\<command>
In addition, on the client computer, the entry CTRLD_Path=ID/bin/sesam;ID/bin/sms in the file ID/var/ini/sm.ini in the section [CTRLD_Server] must be extended to include the directories in which the desired programs are located.
- Open the Regedit editor.
- Go to HKEY_LOCAL_MACHINE\SOFTWARE\SEP Elektronik GmbH\sesam\ and create a new key named CommandEvents. If it does not already exist, right click and select New Key.
- Enter <user> and then <command> with the full path information as the key.
The available commands are:
Command | Execution |
---|---|
* | all commands |
cmd /c | all DOS commands (dir, etc.) |
DOS command (e.g., dir) | specific DOS command only (e.g., dir) |
specific command (e.g., ping) | specific command only (e.g., ping) |
If there are other commands, the last command is executed. If you use a wildcard (*), all commands are executed.
Below is an example of a registry file (*.reg) that allows all command events for the administrator and the 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\*]
Note | |
The most common errors when setting up the desired user permissions and allowed commands are:
|