Chapter 8. Accessing Support Using the Red Hat Support Tool
Chapter 8. Accessing Support Using the Red Hat Support Tool The Red Hat Support Tool , in the redhat-support-tool package, can function as both an interactive shell and as a single-execution program. It can be run over SSH or from any terminal. It enables, for example, searching the Red Hat Knowledgebase from the command line, copying solutions directly on the command line, opening and updating support cases, and sending files to Red Hat for analysis. 8.1. Installing the Red Hat Support Tool The Red Hat Support Tool is installed by default on Red Hat Enterprise Linux. If required, to ensure that it is, enter the following command as root : 8.2. Registering the Red Hat Support Tool Using the Command Line To register the Red Hat Support Tool to the customer portal using the command line, run the following commands: Where username is the user name of the Red Hat Customer Portal account. 8.3. Using the Red Hat Support Tool in Interactive Shell Mode To start the tool in interactive mode, enter the following command: The tool can be run as an unprivileged user, with a consequently reduced set of commands, or as root . The commands can be listed by entering the ? character. The program or menu selection can be exited by entering the q or e character. You will be prompted for your Red Hat Customer Portal user name and password when you first search the Knowledgebase or support cases. Alternately, set the user name and password for your Red Hat Customer Portal account using interactive mode, and optionally save it to the configuration file. 8.4. Configuring the Red Hat Support Tool When in interactive mode, the configuration options can be listed by entering the command config --help : Registering the Red Hat Support Tool Using Interactive Mode To register the Red Hat Support Tool to the customer portal using interactive mode, proceed as follows: Start the tool by entering the following command: Enter your Red Hat Customer Portal user name: To save your user name to the global configuration file, add the -g option. Enter your Red Hat Customer Portal password: 8.4.1. Saving Settings to the Configuration Files The Red Hat Support Tool , unless otherwise directed, stores values and options locally in the home directory of the current user, using the ~/.redhat-support-tool/redhat-support-tool.conf configuration file. If required, it is recommended to save passwords to this file because it is only readable by that particular user. When the tool starts, it will read values from the global configuration file /etc/redhat-support-tool.conf and from the local configuration file. Locally stored values and options take precedence over globally stored settings. Warning It is recommended not to save passwords in the global /etc/redhat-support-tool.conf configuration file because the password is just base64 encoded and can easily be decoded. In addition, the file is world readable. To save a value or option to the global configuration file, add the -g, --global option as follows: Note In order to be able to save settings globally, using the -g, --global option, the Red Hat Support Tool must be run as root because normal users do not have the permissions required to write to /etc/redhat-support-tool.conf . To remove a value or option from the local configuration file, add the -u, --unset option as follows: This will clear, unset, the parameter from the tool and fall back to the equivalent setting in the global configuration file, if available. Note When running as an unprivileged user, values stored in the global configuration file cannot be removed using the -u, --unset option, but they can be cleared, unset, from the current running instance of the tool by using the -g, --global option simultaneously with the -u, --unset option. If running as root , values and options can be removed from the global configuration file using -g, --global simultaneously with the -u, --unset option. 8.5. Opening and Updating Support Cases Using Interactive Mode Opening a New Support Case Using Interactive Mode To open a new support case using interactive mode, proceed as follows: Start the tool by entering the following command: Enter the opencase command: Follow the on screen prompts to select a product and then a version. Enter a summary of the case. Enter a description of the case and press Ctrl + D on an empty line when complete. Select a severity of the case. Optionally chose to see if there is a solution to this problem before opening a support case. Confirm you would still like to open the support case. Optionally chose to attach an SOS report. Optionally chose to attach a file. Viewing and Updating an Existing Support Case Using Interactive Mode To view and update an existing support case using interactive mode, proceed as follows: Start the tool by entering the following command: Enter the getcase command: Where case-number is the number of the case you want to view and update. Follow the on screen prompts to view the case, modify or add comments, and get or add attachments. Modifying an Existing Support Case Using Interactive Mode To modify the attributes of an existing support case using interactive mode, proceed as follows: Start the tool by entering the following command: Enter the modifycase command: Where case-number is the number of the case you want to view and update. The modify selection list appears: Follow the on screen prompts to modify one or more of the options. For example, to modify the status, enter 3 : 8.6. Viewing Support Cases on the Command Line Viewing the contents of a case on the command line provides a quick and easy way to apply solutions from the command line. To view an existing support case on the command line, enter a command as follows: Where case-number is the number of the case you want to download. 8.7. Additional Resources The Red Hat Knowledgebase article Red Hat Support Tool has additional information, examples, and video tutorials.
~]# yum install redhat-support-tool ~]# redhat-support-tool config user username ~]# redhat-support-tool config password Please enter the password for username : ~]USD redhat-support-tool Welcome to the Red Hat Support Tool. Command (? for help): ~]# redhat-support-tool Welcome to the Red Hat Support Tool. Command (? for help): config --help Usage: config [options] config.option <new option value> Use the 'config' command to set or get configuration file values. Options: -h, --help show this help message and exit -g, --global Save configuration option in /etc/redhat-support-tool.conf. -u, --unset Unset configuration option. The configuration file options which can be set are: user : The Red Hat Customer Portal user. password : The Red Hat Customer Portal password. debug : CRITICAL, ERROR, WARNING, INFO, or DEBUG url : The support services URL. Default=https://api.access.redhat.com proxy_url : A proxy server URL. proxy_user: A proxy server user. proxy_password: A password for the proxy server user. ssl_ca : Path to certificate authorities to trust during communication. kern_debug_dir: Path to the directory where kernel debug symbols should be downloaded and cached. Default=/var/lib/redhat-support-tool/debugkernels Examples: - config user - config user my-rhn-username - config --unset user ~]# redhat-support-tool Command (? for help): config user username Command (? for help): config password Please enter the password for username : Command (? for help): config setting -g value Command (? for help): config setting -u value ~]# redhat-support-tool Command (? for help): opencase Support case 0123456789 has successfully been opened ~]# redhat-support-tool Command (? for help): getcase case-number ~]# redhat-support-tool Command (? for help): modifycase case-number Type the number of the attribute to modify or 'e' to return to the previous menu. 1 Modify Type 2 Modify Severity 3 Modify Status 4 Modify Alternative-ID 5 Modify Product 6 Modify Version End of options. Selection: 3 1 Waiting on Customer 2 Waiting on Red Hat 3 Closed Please select a status (or 'q' to exit): ~]# redhat-support-tool getcase case-number