0% found this document useful (0 votes)
3 views

Using WebLogic Server Commands

This document outlines the syntax and required arguments for using WebLogic Server commands, specifically focusing on user credentials and connection parameters. It details how to specify the server URL, username, password, and options for using user-configuration and key files for secure credential management. Additionally, it provides examples of command usage and explains the precedence of user credential arguments.

Uploaded by

fookchia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Using WebLogic Server Commands

This document outlines the syntax and required arguments for using WebLogic Server commands, specifically focusing on user credentials and connection parameters. It details how to specify the server URL, username, password, and options for using user-configuration and key files for secure credential management. Additionally, it provides examples of command usage and explains the precedence of user credential arguments.

Uploaded by

fookchia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

Using WebLogic Server Commands

This section presents the syntax and required arguments for using WebLogic Server
commands. WebLogic Server commands are not case-sensitive.

Syntax

java weblogic.Admin [-url URL]


[ { -username username [-password password] } |
{ [-userconfigfile config-file] [-userkeyfile admin-key] }
]
COMMAND arguments

Connection and User Credentials Arguments

Note: When you invoke most weblogic.Admin commands, you specify the arguments in
Table 21-1 to connect to a WebLogic Server instance and to specify the user
credentials of a WebLogic Server user who has permission to invoke the command.

Table 21-1 Conection and User Credentials Arguments

Argument

Definition

-url URL

Specifies one of the following:

The listen address of the domain's Administration Server. In most cases, we


recommend that you use this URL because it runs the command within the security
context of the Administration Server.

The listen address of the WebLogic Server that is the target of the command.
Use this URL if you cannot access the Administration Server and you want to target
a Managed Server.

The format is hostname:port. The default is localhost:7001.

-username username

Username that has permission to invoke the command you specify.

If you do not specify this argument, weblogic.Admin uses a user-configuration file


and key file.

-password password

The password that is associated with the username.

If you specify -username username but do not specify the -password argument,
weblogic.Admin prompts you for a password.

If WL_HOME\server\bin is specified in the PATH environment variable, weblogic.Admin


uses a set of WebLogic Server libraries that prevent the password from being echoed
to standard out. For information on setting environment variables, see Setting the
Classpath Option.

-userconfigfile config-file

Specifies the name and location of a user-configuration file, which contains an


encrypted username and password. The encrypted username must have permission to
invoke the command you specify.

If you do not specify -userconfigfile config-file, weblogic.Admin searches for a


user-configuration file at the default path name. (See STOREUSERCONFIG.)

-userkeyfile admin-key

Specifies the name and location of the key file that is associated with the user-
configuration file you specify.

When you create a user-configuration file, the STOREUSERCONFIG command uses a key
file to encrypt the username and password. Only the key file that encrypts a user-
configuration file can decrypt the username and password.

If you do not specify -userkeyfile admin-key, weblogic.Admin searches for a key


file at the default path name. (See STOREUSERCONFIG.)

Note: The exit code for all commands is 1 if the Administration client cannot
connect to the server.

Summary of User Credentials Arguments

Table 21-1 describes the alternatives that the weblogic.Admin utility provides for
passing usernames and passwords to a server instance.

In a development environment in which security is not a top priority, you can use
the -username and -password arguments when invoking the weblogic.Admin utility
directly on the command line or in scripts. With these arguments, the username and
password are not encrypted. If you store the values in a script, the user
credentials can be used by anyone who has read access to the script.

In an environment in which security is a top priority, create user-configuration


files and key files. A user-configuration file contains encrypted user credentials
that can be decrypted only by a single key file. You can include the -
userconfigfile config-file and -userkeyfile admin-key arguments in scripts without
exposing the plain text user credentials to those with read privileges for the
script. For information about creating a user-configuration and key file, see
STOREUSERCONFIG.

The following list summarizes the order of precedence for the weblogic.Admin user-
credentials arguments:

If you specify -username username -password password, the utility passes the
unencrypted values to the server instance you specify in the -url argument.

These arguments take precedence over the { -userconfigfile config-file -


userkeyfile admin-key } arguments. If you specify both { -username username -
password password } and { -userconfigfile config-file -userkeyfile admin-key }, the
weblogic.Admin utility uses the { -username username -password password } arguments
and ignores the user-configuration and key file arguments.
If you specify -username username, the utility prompts for a password. Then it
passes the unencrypted values to the server instance you specify in the -url
argument.

This argument also takes precedence over the { -userconfigfile config-file -


userkeyfile admin-key } arguments.

If you specify { -userconfigfile config-file -userkeyfile admin-key } and do


not specify { -username username [-password password]}, the utility passes the
values that are encrypted in config-file to the server instance you specify in the
-url argument.

If you specify neither { -username username [-password password] } nor { -


userconfigfile config-file -userkeyfile admin-key }, the utility searches for a
user-configuration file and key file at the default path names. The default path
names vary depending on the JVM and the operating system. See Configuring the
Default Path Name.

Examples of Providing User Credentials

The following command specifies the username weblogic and password weblogic
directly on the command line:
java weblogic.Admin -username weblogic -password weblogic COMMAND

The following command uses a user-configuration file and key file that are located
at the default pathname:
java weblogic.Admin COMMAND

See Configuring the Default Path Name.

The following command uses a user-configuration file named c:\wlUser1-


WebLogicConfig.properties and a key file named e:\secure\myKey:
java -userconfigfile c:\wlUser1-WebLogicConfig.properties
-userkeyfile e:\secure\myKey COMMAND

You might also like