One way to access eMBox is to use its Java command line client. The command line client has two modes: interactive and batch. In the interactive mode, you run the eMBox commands one at a time. In the batch mode, you can run a group of commands unattended. The command line client has logging service for both modes.
The command line client is a Java application. To run it, you must have access to the Java Runtime Environment, which is installed with eDirectory. You must also have access behind the firewall to the servers you want to manage. You can perform tasks for multiple servers from one server or workstation.
In this section:
To display the eMBox general command line help before going in to the eMBox Client, do the following:
To display the eMBox interactive command line help while you are in the interactive mode, at the eMBox Client prompt enter a question mark (?). For example,
eMBox Client> ?
The help displays information on the command-line options like the information in eMBox Command Line Client Options .
Interactive mode lets you run eMBox commands one at a time.
In this section:
The eMBox Client and the Sun JVM 1.3.1 are installed with eDirectory. To open the eMBox Client in interactive mode on an eDirectory server, do the following:
The edirutil file gives you a shortcut to running the eMBox Client. It points to the Java executable and the default location where the eMBox Client is installed with eDirectory, and for NetWare, it includes the necessary -ns option (which is a Java option on NetWare meaning "new screen"). (You can also enter the information manually, as described in Setting Up the Path and Classpath for eMBox Client .)
You must have access behind the firewall to use the eMBox command line client for the servers you want to manage---so if you are remote, you'll need VPN access.
To use the eMBox Client on a machine other than an eDirectory server:
You can't use the edirutil command on a workstation as a shortcut to getting in to the eMBox Client in interactive mode as you can on a server. You must either set up the environment once in your path and class path, or enter it manually each time. See Setting Up the Path and Classpath for eMBox Client .
If you are running the eMBox Client on an eDirectory server and have not changed the location of Java or the eMBoxClient.jar file, you can use edirutil as a shortcut to running the eMBox Client. (See Running the eMBox Client on an eDirectory Server .)
But if you have changed the default locations, or you are running the eMBoxClient.jar file on a machine that is not a server, or you wish to enter the classpath manually, you need to set up the path and classpath for the eMBox Client as explained in this section.
You can run the eMBox Client from anywhere on your machine if you do the following:
If you are on a server, this is probably already done for you. On Windows and UNIX servers, the directory needs to be in your path. On NetWare, instead of adding the directory to a path, Java needs to be running.
On a workstation, you might need to set it up yourself. For example, on Windows, click Start > Settings > Control Panel > System. On the Advanced tab, click Environment Variables and add the path to the Path variable.
To enter this manually: If the path to the Java executable has not been added to your path, at the command line you will need to first change to the directory containing the Java executable before running embox. For example, on Windows enter
cd c:\novell\nds\embox\jre\bin
NetWare server:
set ENVSET=path\eMBoxClient.jar
Windows server or workstation:
set CLASSPATH=path\eMBoxClient.jar
UNIX server or workstation:
export CLASSPATH=path/eMBoxClient.jar
To enter this manually: An alternative way to specify the classpath is to use the -cp flag for Java each time you want to run eMBox:
java -cp path/eMBoxClient.jar embox -i
For example, on Windows enter
java -cp c:\novell\nds\embox\eMBoxClient.jar embox -i
WARNING: On a NetWare server only, to avoid an abend you must include -ns (a Java option on NetWare for "new screen"). For example,
java -ns -cp sys:\system\embox\eMBoxClient.jar embox -i
After doing both of these steps, you can run the client in interactive mode from anywhere on your machine using the following command:
java embox -i
WARNING: On a NetWare server only, to avoid an abend you must include -ns (a Java option on NetWare for "new screen"). For example,
java -ns embox -i
For information on Java commands, see the Java documentation on the Sun Web site.
To log in to a server, you need to specify the server name or IP address and the port number to connect to a particular server. A username and password are not needed for public logins.
For example, after opening the eMBox Client in interactive mode, enter:
login -s 137.65.123.244 -p 8008 -u admin.mycompany -w mypassword -n
For more information, see Finding Out eDirectory Port Numbers .
The default language is the client system language, so in most cases you won't need to explicitly set a language. Similarly, the default timeout should work in most cases. To set the log file, specify the filename and the mode for opening it (append or overwrite).
See the following table for sample commands.
After logging in to a server, you can use the list command to display a list of the services available on that server.
The list command displays the following eMTools and their services dynamically:
Use -r to force the refresh of the list. Use -t to list service details. Use -f to list just the command format.
See the following table for sample commands.
You can perform tasks using each of the eMTool services after you have logged in to a server. For example:
Command | Description |
---|---|
dsrepair.rld |
Repair local database. |
backup.getconfig |
Get backup configuration information. |
For more information, see the eDirectory 8.7 Administration Guide on the Novell documentation web site.
To log out from the current session, use the following command:
logout
If you log in to a different server, you don't need to use this command; you are automatically logged out of the current server.
To exit the client, use either of the following commands:
exit
or
quit
There are three ways you can run the eMBox Client in batch mode:
You can use a combination of the system and internal batch files for more flexibility and for organizing and reusing commands that you run often.
You can perform a single eMBox task in batch mode at the command line, simply by entering the command using the -t option to specify the tool and task, and ommitting the -i option (-i specifies interactive mode). For example,
java embox -s 137.65.123.244 -p 8008 -u admin.mycompany -w mypassword -l mylog.txt -t dsrepair.rld
For multiple tasks on different servers, or for tasks you perform often, a better alternative is to use an internal batch file. For more information, see Internal Batch File below.
To run the eMBox Client in batch mode using an eMBox Client internal batch file, you need to create a file which contains a group of eMBox commands you would run in the interactive mode.
An eMBox Client internal batch file lets you run all the commands in the batch file without your attention. You can perform multiple tasks with multiple eMBox tools on the same server without having to log in and log out again for each task. From one server, you can also perform tasks with multiple eMBox tools on multiple servers.
Internal batch files can help you organize and reuse commands that you perform often, so you don't have to enter them manually at the command line each time.
You can go to the command line and run the internal batch file using an eMBox Client command. For example, this command would log in to a server and run the commands listed in the mybatch.mbx file:
java embox -s 137.65.123.244 -p 8008 -u admin.mycompany -w mypassword -l mylog.txt -o -b mybatch.mbx -n
WARNING: On NetWare only, to avoid an abend you must include -ns (a Java option on NetWare for "new screen"). For example,
java -ns embox -s 137.65.123.244 -p 8008 -u admin.mycompany -w mypassword -l mylog.txt -o -b mybatch.mbx -n
Another option is to put the same kind of command in a system batch file, so that you can schedule it to run on the server unattended. See System Batch File below.
Here is an example of an eMBox internal batch file. It contains examples of the commands you could run and an example of logging in to a different server. This example assumes that you logged in to a server when you opened the eMBox Client. (Each command must be on a separate line. Lines beginning with # are comments.)
# This file is named mybatch.mbx.
# This is an example of commands you could use in
# an eMBox internal command batch file.
# Backup commands
backup.getconfig
backup.backup -b -f mybackup.bak -l backup.log -t -e -w
# DSRepair commands
dsrepair.rld
# Log in to a different server
login -s 137.65.123.255 -p 8008 -u admin.mycompany -w mypassword -n
# DSMerge commands
dsmerge.pr -u admin.mycompany -p admin.mycompany -n mypassword # Schema Operations
dsschema.rst
dsschema.dse
dsschema.rls
dsschema.gsu
dsschema.scc
dsschema.irs -n LocalTree
# DSService commands
service.serviceList
# End of example.
As with other command line tools, you can create system batch files containing eMBox Client commands and run them manually at the command line or schedule them to run on the server unattended.
From one server, you can perform tasks with multiple eMBox tools on multiple servers.
In a system batch file, you can use a combination of eMBox Client single commands and internal batch files for more flexibility and for organizing and reusing commands that you run often. For more information, see Internal Batch File above.
Option | Description |
---|---|
-? or -h |
Display help information |
-i |
Interactively run eMBox commands one at a time. |
-s server |
Name or IP address of the eMBox server. Default=127.0.0.1 |
-p port |
Port number of the eMBox server. Default=80 |
-u user |
User DN. For example, admin.mycompany. Default=anonymous |
-w password |
Password associated with the user specified with -u. |
-m mode |
Login mode. Default=dclient |
-n |
Do not try to make a secure SSL connection. Use a nonsecure connection. If you do not use this option, the eMBox Client will try to establish an SSL connection, and you must have the JSSE files in your class path or it will return an error. See Establishing a Secure Connection with the eMBox Client for more information. |
-l log file |
Name of the log file. |
-o |
Overwrite the log file when opening it. |
-T timeout |
How long (in seconds) to wait for responses from the server. |
-L language |
List of comma-delimited acceptable languages in order of preference, such as en-US,de_DE. This option defaults to the client system language. |
-t [tool.]task options |
Perform a single service with this connection. The string following -t should be a valid eMBox command. |
-b eMBox batch file |
Perform a group of services as specified in the batch file. The eMBox commands in the batch file should be put on separate lines. Lines preceded by # are comments. |
If you use a nonsecure connection, all the information you enter, such as user names and passwords, is sent over the wire in clear text.
If you instead want to establish a secure connection using SSL, do the following:
If you don't, the eMBox Client will return an error.
You can get information about JSSE and these files from the Sun Web site.
When logging in to a server in the eMBox Client, you must specify a port number.
If you specified a port number when you installed eDirectory, use that number.
The default ports are as follows:
Below are some additional tips for finding out the port that is assigned to eDirectory:
Click Start > Settings > Control Panel.
Double-click the Novell eDirectory Services icon, then click the Transport tab.
Look up the secure or nonsecure port.
Click the plus sign next to Bound Transports to see the port number.
The Network Address property of a Server object will show you the ports.
You can look up the Network Address property of a server object in the following tools:
Look for the network addresses that begin with http: or https: and have "/portal" at the end. These are the nonsecure and secure ports used for eMBox tools.
Here's how to tell what the port number is:
For example, http://137.65.188.1:8008/portal means that a Web server was probably using the default port 80 at the time eDirectory was installed on a non-NetWare platform, so instead port 8008 is being used.
For example, https://137.65.188.1/portal is displaying no port number after the IP address, which means that the default secure portal number is being used for eMBox tools: 8009 on NetWare, 443 on other platforms.
You can use this command to see a list of ports:
ndsconfig get | grep http
Look for the lines that say http.server.interface and then a port number.
You can also look up the port number in iManager or ConsoleOne using the same method described for NetWare. See On NetWare for more information.