Sun Patch Manager 2.0 Administration Guide for the Solaris 9 Operating System

ProcedureHow to Access the Sun Patch Manager Command-Line Interface (Command Line)

By default, the smpatch command runs in local mode.

  1. Decide whether to manage patches on the local system or on a remote system.

    • If you want to manage patches on the local system only, go to Step 2.

    • If you want to manage patches on a remote system, go to Step 4.

      The Solaris WBEM services must be running on the remote system.

  2. Log in to a system as a user with appropriate authorizations or assume a role with the appropriate authorizations.

    Note that you must be an appropriately authorized user to assume an appropriate role. See Configuring RBAC (Task Map) in System Administration Guide: Security Services.

  3. Run the smpatch command you want.

    For example:


    $ smpatch analyze
    
  4. Log in to a system as a user who is appropriately authorized or is permitted to assume a role that is appropriately authorized.

  5. Run the smpatch command with the -n option to specify the name of the system on which to operate.

    For example:


    $ smpatch analyze -n system-name
    

    To perform the operation with an assumed role, type:


    $ smpatch analyze -r role-name -n system-name
    

Example 5–1 Accessing the Sun Patch Manager Command-Line Interface

The following examples use the smpatch get command, which lists the configuration settings for your patch management environment.

This example shows how to run the smpatch command on the local system.


# smpatch get

This example shows how an authorized user can run the smpatch command on the remote system called jupiter.


# smpatch get -n jupiter

This example shows how you can run the smpatch command on the remote system called jupiter as the role patcher.


# smpatch get -r patcher -n jupiter

What to Do Next

You can use the smpatch command to configure the patch management environment for your system and manage patches. See the following: