Example: Using Crontab To Schedule Attack Updates - Juniper NETWORK AND SECURITY MANAGER 2010.3 - ADMINISTRATION GUIDE REV1 Administration Manual

Table of Contents

Advertisement

Copyright © 2010, Juniper Networks, Inc.
Log into the GUI server.
1.
Change to the utility directory by typing: cd /usr/netscreen/GuiSvr/utils.
2.
Create a shell script with the following elements:
3.
Set the NSMUSER environment variable with an NSM domain/user pair. The
command for setting environment variables depends on your OS.
Example: export NSMUSER=domain/user
Set the NSMPASSWD environment variable with an NSM password. The command
for setting environment variables depends on your OS and shell.
Example: export NSMPASSWD=password
Specify a
guiSvrCli
command string.
Example: /usr/netscreen/GuiSvr/utils/guiSvrCli.sh --update-attacks --post-action
post_action_options
Make the script executable. Make sure the person who will create the cron job has
4.
permission to run the script.
Run the crontab editor.
5.
crontab -e
Add an entry for the shell script
6.
<minutes after hour> <hour> * * * path/attack_update_shell_script
During the update, the
guiSvrCli
performs the post actions. After updating and executing actions, the system generates
an exit status code of 0 (no errors) or 1 (errors).

Example: Using Crontab to Schedule Attack Updates

In this example, you use crontab to update attack objects for online managed security
devices every day at 5:00 am. This example assumes you are running Linux, that you
have a domain called idp, and that there is an NSM user called idpadmin.
Log into the GUI server.
1.
Change to the utility directory by typing: cd /usr/netscreen/GuiSvr/utils.
2.
Create a shell script called attackupdates.sh with the following contents.
3.
export NSMUSER=idp/idpadminexport
NSMPASSWD=idpadminpassword/usr/netscreen/GuiSvr/utils/guiSvrCli.sh
--update-attacks --post-action --update-devices --skip
Make the script executable.
4.
chmod 700 attackupdates.sh
Run the crontab editor.
5.
crontab -e
Add the script to the crontab.
6.
0 5 * * * /usr/netscreen/GuiSvr/utils/attackupdates.sh
utility updates its the attack object database, then
Chapter 7: Managing Devices
295

Advertisement

Table of Contents
loading

This manual is also suitable for:

Network and security manager 2010.3

Table of Contents