4 4 3:Creating a Command Event: Difference between revisions
m (Added link.) |
(Fixed heading levels and excluded items from print for SBA book.) |
||
(20 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{Copyright SEP AG|en}} | <noinclude><translate><!--T:1--> | ||
<div class="noprint"><languages /> | |||
{{Navigation_latest|release=4.4.3|link=[[SEP_sesam_Documentation# | {{Copyright SEP AG|en}}</div></translate> | ||
==Overview== | |||
<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>Additional resources</b></center> | <translate><!--T:2--> | ||
{{Navigation_latest|release=[[Special:MyLanguage/SEP_sesam_Release_Versions|4.4.3/4.4.3 ''Beefalo V2'']]|link=[[Special:MyLanguage/SEP_sesam_Documentation#previouss|Documentation archive]]}}</translate><br /> | |||
<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;" | [[File:SEP_next.png|45px|link=About_Scheduling]] | | rowspan="2" style="padding:0px 10px 0px;" | <translate><!--T:5--> | ||
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | See also | [[File:SEP_next.png|45px|link=Special:MyLanguage/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]] | | 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> | |||
|} | |} | ||
{|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 Tip.png|45px|link=Special:MyLanguage/FAQ|FAQ]] | | rowspan="2" style="padding:0px 10px 0px;" | <translate><!--T:7--> | ||
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;" | Check [[Special:MyLanguage/FAQ|FAQ]] to find the answers to most common questions. | [[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;" | [[File:SEP Troubleshooting.png|45px|link=Special:MyLanguage/Troubleshooting_Guide|Troubleshooting Guide]] | | rowspan="2" style="padding:0px 10px 0px;" | <translate><!--T:9--> | ||
| style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;"|Problems? See [[Special:MyLanguage/Troubleshooting_Guide | [[File:SEP Troubleshooting.png|45px|link=Special:MyLanguage/Troubleshooting_Guide|Troubleshooting Guide]]</translate> | ||
|}</div> | | style="padding:0px 40px 0px 10px; color: grey; font-size: 90%; text-align:left;"|<translate><!--T:10--> | ||
Problems? See [[Special:MyLanguage/Troubleshooting_Guide| SEP sesam Troubleshooting Guide]].</translate> | |||
|}</div></noinclude> | |||
<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. | 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== | ====Steps==== <!--T:12--></translate> | ||
<ol><li>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 | <ol><li><translate><!--T:13--> | ||
[[image: | 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'''. The ''New Command Event'' window is displayed.</translate><br /> | ||
<translate><!--T:42--> Note that 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><br /> | |||
<translate><!--T:41--> | |||
[[image:New_command_event_Beefalo.jpg|600px|link=]]</translate> | |||
<br clear=all> | <br clear=all> | ||
<li> | </li> | ||
<ul><li>'''Priority | <li><translate><!--T:14--> | ||
<li> '''Blocking date | Under the '''Parameter''' tab, specify the following settings:</translate> | ||
<li>'''Name | <ul><li><translate><!--T:15--> | ||
[[image: | '''''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 exceptions are 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:16--> | |||
'''''Blocking date''''': This should be 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. See [[Special:MyLanguage/4_4_3_Beefalo:SEPuler_-_an_event_calendar#blocking_events|Blocking Events]].</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 by clicking the ''Choose'' button 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 '''Select''' button, and ''change'' or ''delete'' an existing command event.</translate><br /> | |||
<translate><!--T:18--> | |||
[[image:Select_command_Beefalo.jpg|600px|link=]]</translate> | |||
<br clear=all> | <br clear=all> | ||
<li>'''Client | </li> | ||
<li>'''User | <li><translate><!--T:19--> | ||
<li>'''Command''' | '''''Client''''': Select a client on which the command will be executed.</translate></li> | ||
<li>Click '''OK''' to add your command | <li><translate><!--T:20--> | ||
'''''User''''': Enter the user name of a user with sufficient access to execute the command on the client.</translate></li> | |||
<li><translate><!--T:43--> '''''Retention time''''': Specify for how long (in days) the command event results and logs will be kept.</translate></li> | |||
<li><translate><!--T:21--> | |||
'''''Command''''': Enter the complete command. In v. < 4.4.3 ''Beefalo'', you can also add here the additional parameters to command, if required.</translate></li> | |||
<li><translate><!--T:44--> '''''Add to command''''' (available in v. ≥ 4.4.3 ''Beefalo''): Optionally, add additional parameters to command, e.g., sm_sho.</translate></li></ul></li> | |||
<li><translate><!--T:22--> | |||
Click '''OK''' to add your command event 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/event.</translate></li></ol> | |||
{{tip| | {{<translate><!--T:23--> | ||
You can also access the configured commands from the ''Menu | tip</translate>| | ||
<translate><!--T:24--> | |||
You can also access the configured commands from the ''Menu bar'' -> ''Configuration'' -> ''Command''.</translate>}} | |||
==Setting permission to execute commands== | <translate>==={{anchor|permission}}Setting permission to execute commands=== <!--T:25--> | ||
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. | <!--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. If a command should be started from another directory before the regular backup starts, this must be entered/permitted at the target client.</translate> | |||
;UNIX | ;UNIX | ||
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 { | <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 {user} {command} 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>. | No explicit permissions are required to execute SEP sesam commands such as <tt>sm_loader</tt>.</translate> | ||
;Windows | ;Windows | ||
To set access rights for the user and command, use the following key: < | <translate><!--T:28--> | ||
To set access rights for the user and command, use the following key:</translate> {{Path|\\HKLM\SOFTWARE\SEP Elektronik GmbH\sesam\CommandEvents\<translate><!--T:45--> <user></translate>\<translate><!--T:46--> <command></translate>}} | |||
<translate><!--T:29--> | |||
Additionally 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 section <tt>[CTRLD_Server]</tt> must be extended with the directories where the desired programs reside.</translate> | |||
# <translate><!--T:30--> | |||
Open the Regedit editor.</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> | |||
The available commands are: | <translate><!--T:33--> | ||
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;" | ||
|- style="background:#FFCC01; color:#002F55" | |||
cmd /c | ! scope="col" |<translate><!--T:47--> Command</translate> | ||
DOS- | ! scope="col" |<translate><!--T:48--> Execution</translate> | ||
|- | |||
|style="text-align: center;"|*|| style="text-align: center;"| <translate><!--T:49--> all instructions</translate> | |||
|- | |||
|style="text-align: center;"|<tt>cmd /c</tt>|| style="text-align: center;" |<translate><!--T:50--> 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><!--T:51--> only specific DOS command (e.g., <tt>dir</tt>)</translate> | |||
|- | |||
|style="text-align: center;"|<tt>specific command (e.g., <tt>ping</tt>)</tt>|| style="text-align: center;"| <translate><!--T:52--> only specific command (e.g., <tt>ping</tt>)</translate> | |||
|- | |||
|} | |||
<translate><!--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. | ||
[[Image:Registryentry.JPG]] | <!--T:36--> | ||
[[Image:Registryentry.JPG|link=]]</translate> | |||
<br clear=all> | <br clear=all> | ||
Below is an example of a registry file (*.reg) that allows all command events for the ''administrator'' and ''sesam'' user: | <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\*] | ||
{{note| | {{<translate><!--T:38--> | ||
note</translate>| | |||
<translate><!--T:39--> | |||
The most common errors when setting up the desired user permissions and allowed commands are: | 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. | * Instead of entering a command as a key, it is entered as a character string.</translate> | ||
}} | }} | ||
==See also== | <noinclude><translate><div class="noprint"> | ||
[[Special:MyLanguage/Follow-up_Events|Creating Follow-up Events]] – [[Special:MyLanguage/Creating a Schedule|Creating a Schedule]] – [[Special:MyLanguage/About_Scheduling|About Scheduling]] | ===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]]</div></translate></noinclude> |
Revision as of 14:16, 6 August 2020
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
- 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. The New Command Event window is displayed.
Note that 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.
- 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 exceptions are schedules with priority 0, which override all other priorities and are always executed. For details, see Event Priority.
- Blocking date: This should be 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. See Blocking Events.
- Name: Enter a name for the new event or search for and select an already existing command event. Searching for command by clicking the Choose button 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 Select button, and change or delete an existing command event.
- Client: Select a 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.
- Retention time: Specify for how long (in days) the command event results and logs will be kept.
- Command: Enter the complete command. In v. < 4.4.3 Beefalo, you can also add here the additional parameters to command, if required.
- Add to command (available in v. ≥ 4.4.3 Beefalo): Optionally, add additional parameters to command, e.g., sm_sho.
- Click OK to add your command event 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/event.
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. If a command should be started from another directory before the regular backup starts, this must be entered/permitted at 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: \\HKLM\SOFTWARE\SEP Elektronik GmbH\sesam\CommandEvents\<user>\<command>
Additionally on the client computer the entry CTRLD_Path=ID/bin/sesam;ID/bin/sms in the file ID/var/ini/sm.ini in section [CTRLD_Server] must be extended with the directories where the desired programs reside.
- Open the Regedit editor.
- 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.
- Enter <user> and then <command> with the full path information as the key.
The available commands are:
Command | Execution |
---|---|
* | all instructions |
cmd /c | all DOS commands (dir, etc.) |
DOS command (e.g., dir) | only specific DOS command (e.g., dir) |
specific command (e.g., ping) | only specific command (e.g., ping) |
If there are any other commands present, the last command will be executed. If you use a wildcard (*), all commands will be executed.
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\*]
Note | |
The most common errors when setting up the desired user permissions and allowed commands are:
|