Installation manual
Executing a Single UNIX Command
Using the UNIX Command window, you can send a single command to the selected
client computers. The command is executed using the bash shell.
To execute a single UNIX command:
1 Select a computer list in the Remote Desktop window.
2 Select one or more computers in the selected computer list.
3 Choose Manage > Send UNIX Command.
4 Type or paste the command.
If your command is a multi-line script, enter each command on its own line. If you
want to break up a single-line command for better readability, use a backslash (\) to
begin a new line.
5 Set the permissions used to execute the command.
You can choose the currently logged-in user, or choose the name of another user on
the client computers.
6 Click Send.
Executing Scripts Using Send UNIX Command
There are two kinds of scripts you can execute using the command line. First, and
most common with command lines, is a shell script. A shell script is a le containing a
collection of UNIX commands that are all executed in sequence. Shell scripts can have
normal programming procedures like loops, conditionals, and variables. Shell scripts
are text les with UNIX line endings. Shell scripts are interpreted using the bash shell.
The second kind of script you can execute, and the most common in the Mac OS X
environment, is an AppleScript script. These are les that contain English-like
commands, using the AppleScript programming language and they are created using
the Script Editor application.
Running a UNIX command as the current user fails if the target computer is at the
login window, because there’s no current user. You can use root user for tasks by
entering root in the specied user eld of the task dialog. You don’t actually need to
have the root account enabled on the client computer to specify the root user. You
should never use sudo or su to do tasks as the root user. They are interactive and
expect further input and response from your script. Instead, run your script as root or
as another user with root privileges.
15 4 Chapter 8 Administering Client Computers