subscription-manager(8)

πŸ“¦
version 1.30.16 Β· 3 versions
, in centos-stream 10

🌸 NAME 🌸

okay bestie, this is the manual page for subscription-manager β€” yes, subscription-manager(8) if you’re being all formal about it. It’s the tool that registers systems to a subscription management service, reports system facts, and manages various configurations to the entitled content repositories granted by the subscription management services. πŸ’…


✨ SYNOPSIS ✨

subscription-manager COMMAND [ SUBCOMMAND ] [ OPTIONS ]

πŸ¦‹ DESCRIPTION πŸ¦‹

The subscription-manager program β€” also known as Red Hat Subscription Manager β€” is a client tool, and she’s iconic for it. You can use her to register a system with a subscription management service such as the Red Hat Customer Portal, or an on-premise solution such as Red Hat Satellite. periodt.

Red Hat provides content updates and support by issuing subscriptions for its products. When a system is registered, factual data about the system’s hardware are uploaded to the subscription management services. Those services use the factual data to generate entitlements from the organization’s available product subscriptions and appropriately grant them to the system. Once applied, the registering system can install, update, and receive support for the subscribed software products. no cap, that’s the whole glow-up.


πŸ’… COMMANDS, SUBCOMMANDS, AND OPTIONS πŸ’…

This section details all available commands, subcommands, and their optional parameters. Common options shared across multiple commands are documented at the end of this section, along with information on interactive prompting for required authentication parameters. iykyk.

πŸŽ€ REGISTER OPTIONS πŸŽ€

The register command registers a new system to the subscription management service. main character energy.

  • --username=USERNAME β€” Gives the username for the account which is registering the system; this user account is usually tied to an organization with ownership access to a content delivery system which supplies subscription content. This option is required for user-based authentication, but not key-based authentication.
  • --password=PASSWORD β€” Gives the user account password.
  • --serverurl=SERVER_HOSTNAME:PORT/PREFIX β€” Specifies the URL of the subscription management service used to register the system. By default, this points to the Red Hat Customer Portal Subscription Management service (https://subscription.rhsm.redhat.com:443/subscription).

You can use this parameter to point to a custom or local subscription service. However, using this parameter alone is discouraged, as additional configuration settings are usually required for proper operation.

Note: If you are registering to an on-premise service such as Red Hat Satellite, install the katello-ca-consumer RPM instead. Installing this RPM is more reliable because it automatically sets all required configuration parameters and installs the necessary CA certificates to ensure a secure SSL connection.

You can use this parameter to specify a different content delivery network when registering to a custom subscription service. However, using this parameter alone is discouraged, as other configuration settings must also be updated to ensure the system is properly configured.

Note: If you are registering to an on-premise service such as Red Hat Satellite, install the katello-ca-consumer RPM instead. Installing this RPM is more reliable because it automatically sets all required configuration parameters and installs the necessary CA certificates to ensure a secure SSL connection.
  • --insecure β€” Do not check the server SSL certificate against available certificate authorities.
  • --name=SYSTEM_NAME β€” Sets the name of the system to register. This defaults to the hostname.
  • --consumerid=CONSUMERID β€” References an existing system inventory ID to resume using a previous registration for this system. The ID is used as an inventory number for the system in the subscription management service database. If the system’s identity is lost or corrupted, this option allows it to resume using its previous identity and subscriptions.
  • --activationkey=KEYS β€” Gives a comma-separated list of product keys to apply specific subscriptions to the system. This is used for preconfigured systems which may already have products installed. Activation keys are issued by an on-premise subscription management service, such as Satellite.

When the --activationkey option is used in conjunction with the --org option, then --username and --password are not needed because the authentication information is implicit in the activation key.

For example:

subscription-manager register --org="IT Dept" --activationkey=it_key
  • --force β€” When the system is already registered, a new attempt to register will fail with a message reminding the user that the system is already registered. For that reason, passing the --force option is a convenient way to implicitly unregister the system first.
Note: Specifying the --force option does not guarantee a successful registration. For example, if the registration with --force includes a different --serverurl than was used for the original registration, the implicit call to unregister from the original entitlement server will fail with invalid credentials and the registration with force will be aborted. In this case, the user should explicitly unregister from the original entitlement server. If unregistering is not possible, then running subscription-manager clean will effectively abandon the original registration identity and entitlements. Once cleaned, registering a new system identity should succeed with or without force.
  • --org=ORG β€” Assigns the system to an organization. Infrastructures which are managed on-site may be multi-tenant, meaning that there are multiple organizations within one customer unit. A system may be assigned manually to one of these organizations. When a system is registered with the Customer Portal, this is not required. When a system is registered with an on-premise subscription service such as Red Hat Satellite, this argument is required, unless there is only a single organization configured.
  • --environments=ENV β€” Registers the system to one or more environments within an organization. This is a comma-separated list and the order is maintained.
  • --release=VERSION β€” This register option is a shortcut for the command option release --set=VERSION.

🫢 UNREGISTER OPTIONS 🫢

The unregister command does two important things. Firstly, it will remove all of the entitlement certificates granted to the system thereby returning all consumed quantities of entitlements back to their subscription pools making them available for other registered systems within the organization. Secondly, it will remove the system’s consumer identity thereby removing its connection with the subscription management service. Once unregistered, the system will no longer be entitled to system content updates from the configured subscription management service. big yikes if you still needed those updates, but that’s literally the deal.

This command has no unique options.


🌈 SYSPURPOSE OPTIONS 🌈

The syspurpose command displays the current configured syspurpose preferences for the system.

  • --show β€” Shows the system’s current set of syspurpose preference formatted as JSON. Single-valued entries for which there is no value will be included in the output with a value of "". List entries which have no value will be included in the output with a value of [] (less the quotes).

The syspurpose command also has subcommands for all the various syspurpose preferences and attributes:

  • role
  • service-level
  • usage

πŸ‘‘ SYSPURPOSE ROLE OPTIONS πŸ‘‘

The role subcommand displays the current configured role preference for products installed on the system. For example, if the role preference is "Red Hat Enterprise Linux Server", then a subscription with a "Red Hat Enterprise Linux Server" is counted by subscription utilization reporting services. slay, utilization reporting noticed.

  • --show β€” Shows the system’s current role preference. If a role is not set, then there is a message saying it is not set.
  • --list β€” Lists the available system purpose role preferences.
  • --username=USERNAME β€” Gives the username for the account to use to connect to the organization account [Usable with --list on unregistered systems].
  • --password=PASSWORD β€” Gives the user account password [Usable with --list on unregistered systems].
  • --org=ORG β€” Identifies the organization for which the role applies [Usable with --list on unregistered systems].
  • --set=ROLE β€” Role to apply to this system.
  • --unset β€” Removes any previously set role preference.

🧚 SYSPURPOSE SERVICE-LEVEL OPTIONS 🧚

The service-level subcommand displays the current configured service level preference for products installed on the system. For example, if the service-level preference is standard, then a subscription with a standard service level is counted by subscription utilization reporting services. the way that standard service level gets counted β€” iconic behavior.

  • --serverurl=SERVER_URL β€” Server URL in the form of https://hostname:port/prefix [Usable on unregistered systems].
  • --insecure β€” Do not check the server SSL certificate against available certificate authorities.
  • --show β€” Shows the system’s current service-level preference. If a service level is not set, then there is a message saying it is not set.
  • --list β€” Lists the available system purpose service level preferences.
  • --username=USERNAME β€” Gives the username for the account to use to connect to the organization account [Usable with --list on unregistered systems].
  • --password=PASSWORD β€” Gives the user account password [Usable with --list on unregistered systems].
  • --set=SERVICE_LEVEL β€” Service level to apply to this system.
  • --unset β€” Removes any previously set service-level preference.

πŸ“ SYSPURPOSE USAGE OPTIONS πŸ“

The usage subcommand displays the current configured usage preference for products installed on the system. For example, if the usage preference is "Production", then a subscription with a "Production" usage is counted by subscription utilization reporting services. fr fr, Production is doing what it needs to do.

  • --show β€” shows the system's current usage preference. If a usage isn't set, you get a little message telling you it's not set. No vibes guessed, we just tell you πŸ’…
  • --list β€” lists all the available system purpose usage preferences. Like a menu, but for vibes.
  • --username=USERNAME β€” gives the username for the account to use to connect to the organization account [Usable with --list on unregistered systems].
  • --password=PASSWORD β€” gives the user account password [Usable with --list on unregistered systems].
  • --org=ORG β€” identifies the organization for which the usage applies [Usable with --list on unregistered systems].
  • --set=USAGE β€” the usage to apply to this system. Slap it on ✨
  • --unset β€” removes any previously set usage preference. We simply forget it ever happened 🫢

πŸŽ€ RELEASE OPTIONS πŸŽ€

okay so the release command sets a sticky OS version to use when installing or updating packages. It sets a preference for the minor version of the OS, like 10.2 or 10.3. Why do we care? Because this can prevent unplanned or unsupported operating system version upgrades when an IT environment has to maintain a certified configuration. No surprise glow-ups allowed bestie, not on our watch πŸ”₯

  • --list β€” lists the available OS versions. If a release preference isn't set, then there's a message saying it is not set.
  • --set=RELEASE β€” sets the minor (Y-stream) release version to use, such as 10.3.
  • --unset β€” removes any previously set release version preference. Gone, ghosted, no cap πŸ’€

🌈 REPOS OPTIONS 🌈

The repos command lists all of the content repositories that are available to a system. Heads up: this command is only used for organizations which have a locally-hosted content service of some kind, like Satellite. With Red Hat's hosted content service, there is only one central repository. One. Singular. Main character repository πŸ‘‘

  • --list β€” lists all of the repositories that are provided by the content service used by the system.
  • --list-enabled β€” lists all of the enabled repositories that are provided by the content service used by the system.
  • --list-disabled β€” lists all of the disabled repositories that are provided by the content service used by the system.
  • --enable=REPO_ID β€” enables the specified repository, which is made available by the content sources identified in the system subscriptions. Wanna enable multiple repositories? Use this argument multiple times, it's literally built for that. Wild cards * and ? are supported. The repositories enabled by this option and disabled by --disable are processed in the same order they are specified β€” order matters, bestie, it's giving lineup at a concert 🎀
  • --disable=REPO_ID β€” disables the specified repository, which is made available by the content sources identified in the system subscriptions. To disable multiple repositories, use this argument multiple times. Wild cards * and ? are supported. The repositories disabled by this option and enabled by --enable are processed in the same order they are specified.

πŸ¦‹ REPO-OVERRIDE OPTIONS πŸ¦‹

The repo-override command allows the user to manage custom content repository settings. Customize away, it's your world πŸ’–

  • --repo β€” the repository to modify (can be specified more than once).
  • --add=NAME:VALUE β€” adds a named override with the provided value to repositories specified with the --repo option.
  • --remove=NAME β€” removes a named override from the repositories specified with the --repo option. Important caveat bestie: the override will not be removed if its source is one of the environments the system belongs in. It can only be removed by either: removing the override from the environment it originates from, or removing the system from the environment the override originates from. So it's not ghosting you back, it's just not yours to delete πŸ™ˆ
  • --remove-all β€” removes all overrides from repositories specified with the --repo option. Overrides inherited from environments the system belongs in will not be removed. They can only be removed by either: removing them from the environment they originate from, or removing the system from those environments.
  • --list β€” lists all overrides from repositories specified with the --repo option. The source of the listed overrides is a union of the override specified at the system itself and all the overrides set in the environment(s) the system belongs in. A whole lil collab ✨

πŸ“ LIST OPTIONS πŸ“

The list command lists all of the installed products on the system. And the options let you filter that list. Filtering is self care, fr fr.

  • --installed β€” lists products which are currently installed on the system. This option is applied by default, so like, it's already doing this whether you ask or not πŸ’…
  • --matches=SEARCH β€” limits the output of installed products which contain the SEARCH string within the product naming information. The SEARCH value may contain wildcards ? or * to match a single character or zero or more characters, respectively. The wildcard characters may be escaped with a backslash to represent a literal question mark or asterisk. Likewise, to represent a backslash, it must be escaped with another backslash. Wildcard lore is real, bestie 🧚

⭐ STATUS OPTIONS ⭐

The status command shows the current status of the system. Vibe check, but official:

[root@server ~]# subscription-manager status
+-------------------------------------------+
     System Status Details
+-------------------------------------------+
Overall Status: Registered

This command has no unique options. It's just built different 😌


πŸ’œ ORGS OPTIONS πŸ’œ

The orgs command lists all of the organizations which are available to the specified user account. A multi-tenant infrastructure may have multiple organizations within a single customer, and users may be restricted to access only a subset of the total number of organizations. So you might not see the whole group chat, only your channels 🫢

  • --username=USERNAME β€” gives the username for the account to use to connect to the organization account.
  • --password=PASSWORD β€” gives the user account password.
  • --serverurl=SERVER_HOSTNAME:PORT/PREFIX β€” passes the URL of the subscription service to use. The orgs command will list all organizations for which the user account is granted access. The default value is the Red Hat Customer Portal Subscription Management service. If there is an on-premise subscription service such as Satellite, this parameter can be used to submit the hostname of the subscription service, in the form [protocol://]servername[:port][/prefix]. And a lil shortcut for you: if the katello-ca-consumer RPM for the Satellite is installed, then the default value configuration has been automatically updated making this parameter option unnecessary. Iconic behaviour honestly ✨

🌸 ENVIRONMENTS OPTIONS 🌸

The environments command lists all of the environments that have been configured for an organization. Same deal as before: this command is only used for organizations which have a locally-hosted subscription or content service of some kind, like Satellite. The concept of environments β€” and therefore this command β€” have no meaning for environments which use the Customer Portal Subscription Management services. Not applicable, no notes πŸ’…

  • --username=USERNAME β€” gives the username for the account to use to connect to the organization account.
  • --password=PASSWORD β€” gives the user account password.
  • --org=ORG β€” identifies the organization for which to list the configured environments.
  • --list β€” lists all of the environments that have been configured for an organization.
  • --list-enabled β€” lists the environments in the order that they have been enabled for this consumer.
  • --list-disabled β€” lists all of the environments that have been configured for an organization but not enabled for this consumer.
  • --set=SET β€” sets an ordered list of one or more comma-separated environments for this consumer. Order is the whole point, don't skip it πŸŽ€

πŸ”₯ FACTS OPTIONS πŸ”₯

The facts command lists the system information, like the release version, number of CPUs, and other architecture information. It's basically the system's stats page πŸ‘‘

  • --list β€” lists all of the factual system data collected. These are simple name : value pairs that reflect much of the information in the /etc/sysconfig directory. For example:
cpu.architecture: x86_64
cpu.core(s)_per_socket: 1
cpu.cpu(s): 2
cpu.cpu_family: 6
cpu.cpu_mhz: 1861.776
cpu.cpu_op-mode(s): 64-bit
cpu.cpu_socket(s): 2
cpu.hypervisor_vendor: KVM
cpu.model: 2
cpu.numa_node(s): 1
cpu.numa_node0_cpu(s): 0,1
cpu.stepping: 3
cpu.thread(s)_per_core: 1
cpu.vendor_id: GenuineIntel
cpu.virtualization_type: full
  • --update β€” updates the system information. This is particularly important whenever there is a hardware change (such as adding a CPU) because these changes can affect the subscriptions that are compatible with the system. New hardware? Update the facts. It's that serious πŸ”₯
Note: Troublesome facts can be overridden as well as custom facts added by creating valid JSON files (named with a .facts extension) in the /etc/rhsm/facts/ directory. The contents of these files must have a simple JSON format. Once created, the facts --update command should be executed. Custom facts era, we love to see it πŸŽ€

πŸ’€ IDENTITY OPTIONS πŸ’€

The identity command handles the UUID of a system, which identifies the system to the subscription management service after registration. It can simply return the UUID, or it can be used to restore the registration of a previously-registered system to the subscription management service. Your system's literal government name, bestie πŸͺͺ

  • --regenerate β€” requests that the subscription management service issue a new identity certificate for the system, using an existing UUID in the original identity certificate. If this is used alone, then the identity command also uses the original identity certificate to bind to the subscription management service, using certificate-based authentication.
  • --username=USERNAME β€” gives the username for the account which is registering the system; this user account is usually tied to the user account for the content delivery system which supplies the content. Optional, for user-based authentication.
  • --password=PASSWORD β€” gives the user account password. Optional, for user-based authentication.
  • --force β€” regenerates the identity certificate for the system using username/password authentication. This is used with the --regenerate option. Here's the tea: --regenerate alone will use an existing identity certificate to authenticate to the subscription management service. If the certificate is missing or corrupted or in other circumstances, then it may be better to use user authentication rather than certificate-based authentication. In that case, the --force option requires the username or password to be given either as an argument or in response to a prompt. Pick your fighter, but pick carefully πŸ™ˆ

πŸ¦‹ REFRESH OPTIONS πŸ¦‹

Okay so the refresh command pulls the latest subscription data from the server. Normally, the system polls the subscription management service at a set interval (4 hours by default) to check for any changes in the available subscriptions. The refresh command checks with the subscription management service right then, outside the normal interval. Bestie, use of the refresh command will clear caches related to the content access mode of the system and allow the system to retrieve fresh data as necessary. ✨

  • --force β€” force regeneration of entitlement certificates on the server before these certificates are pulled from the server.

🧼 CLEAN OPTIONS 🧼

The clean command forcibly removes the system's consumer identity and all local subscription entitlement data without contacting the subscription management service. Consequently, subscription entitlements assigned to this system are effectively abandoned. They will remain allocated to this system and unavailable for re-use until managed on the Customer Portal or Satellite server. 😭

This command should rarely be used. Instead, the unregister command should be your first choice when trying to reset the system registration.

The clean command is useful in cases where the local subscription information is corrupted, lost or expired. If the consumer id is still known to the subscription management service, the system can recover its prior registered state by re-registering using the register --consumerid=EXISTING_ID command.

The most appropriate use cases for the clean command are:

  • When "Your identity certificate has expired".
  • When your system is "Unable to verify server's identity" or "Unable to make a connection using SSL client certificate." and you don't know how to recover. This can happen when incomplete attempts are made to switch your system configuration between different subscription management services.

This command has no unique options. 🫢


🧩 PLUGIN OPTIONS 🧩

The plugins command lists the available subscription-manager plugins.

  • --list β€” list the available subscription-manager plugins.
  • --listslots β€” list the available plugin slots.
  • --listhooks β€” list the available plugin slots and the hooks that handle them.
  • --verbose β€” show additional info about the plugins, such as the plugin configuration values.

βš™οΈ CONFIG OPTIONS βš™οΈ

The config command is used to make changes to the /etc/rhsm/rhsm.conf configuration file used by Subscription Manager. Almost all of the connection information used by Subscription Manager to access the subscription management service, content server, and any proxies is set in the configuration file. It also contains general configuration parameters like the frequency that Subscription Manager checks for subscriptions updates. The rhsm.conf file is organized into sections. For example, the [server] section is used to configure the subscription management service. πŸ’…

When changing a configuration, the settings are identified with the format <section>.<parameter> followed by a configuration value.

  • --list β€” prints the current configurations for Subscription Manager.
  • --<section>.<parameter>=VALUE β€” sets a new configuration value for the section parameter. For example: --logging.default_log_level=DEBUG
  • --remove=<section>.<parameter> β€” deletes the current configuration value for the section parameter without specifying a new value. Once deleted, Subscription Manager will use the default value for that parameter. If there are no defaults, then the configuration is ignored.

Review the man page for rhsm.conf (man rhsm.conf) for more detailed information on all of the configuration parameters. πŸŽ€


πŸ‘‘ VERSION OPTIONS πŸ‘‘

The version command displays information about the current Subscription Manager package, the subscription service the system is registered to (if it is currently registered), and the subscription management server that the system is configured to use. For example:

[root@rhel-10 ~]# subscription-manager version
server type: Red Hat Subscription Management
subscription management server: 4.7.5-1
subscription management rules: 5.44
subscription-manager: 1.30.3-1.el10

This command has no unique options.


🌈 COMMON OPTIONS 🌈

The following options are common to most of the commands and subcommands described above.

  • -h, --help β€” prints the specific help information for the given command.
  • --proxy=PROXY β€” uses an HTTP proxy. The PROXY name has the format hostname:port.
  • --proxyuser=PROXYUSERNAME β€” gives the username to use to authenticate to the HTTP proxy.
  • --proxypassword=PROXYPASSWORD β€” gives the password to use to authenticate to the HTTP proxy.
  • --noproxy=NOPROXY β€” specifies a list of domain suffixes which should bypass the HTTP proxy.
  • --no-progress-messages β€” disables progress messages that are being displayed when waiting for a server response.

🚨 REQUIRED OPTIONS 🚨

Some of the commands described above require standard authentication and environment options, such as --username, --password, --org, or --environments. In non-interactive sessions, these parameters must be passed directly as command-line arguments.

Note: If required options are missing, subscription-manager will prompt for input. In a non-interactive shell or automated script, this prompt will cause execution to hang indefinitely. Always provide all necessary arguments when scripting subscription-manager to prevent blocking your automated scripts. πŸ’€

πŸ’€ DEPRECATED COMMANDS πŸ’€

Currently there are no deprecated commands. Zero, zilch, none β€” slay. ✨

πŸ’» USAGE πŸ’»

okay so real talk, the subscription-manager client tool has two major tasks, and that's literally it:

  1. Handling the registration for a given system to a subscription management service
  2. Managing the entitlements granted by the subscription management service

πŸŽ€ REGISTERING AND UNREGISTERING MACHINES πŸŽ€

A system is either registered to a subscription management service β€” which makes all of the subscriptions available to the system β€” or it is not registered. Like, that's the whole vibe check. Unregistered systems necessarily lack valid software subscriptions because there is no way to record that the subscriptions have been used nor any way to renew them. no cap, that's just how it is 😭

The default subscription management service in the Subscription Manager configuration is the Customer Portal Subscription Management service. The configuration file can be edited before the system is registered to point to an on-premise subscription management service like Satellite. slay.

Systems are usually registered to a subscription management service as part of their initial configuration, such as the kickstart process. However, systems can be registered manually after they are configured, can be removed from a content service, or re-registered. flexible queen behavior πŸ’…

If a system has never been registered (not even during first boot), then the register command will register the system with whatever subscription management service is configured in the /etc/rhsm/rhsm.conf file. This command requires, at a minimum, the username and password for an account to connect to the subscription management service. If the credentials aren't passed with the command, then subscription-manager prompts for the username and password interactively. it literally just asks you, bestie 🫢

When there is a single organization or when using the Customer Portal Subscription Management service, only the username/password are required to register. For example:

subscription-manager register --username=admin --password=secret

With on-premise subscription services, such as Satellite, the infrastructure is more complex. The local administrator can define independent groups called organizations which represent physical or organizational divisions (--org). Those organizations can be subdivided into environments (--environments). Optionally, the information about what subscription service (--serverurl) and content delivery network (--baseurl) to use for the system registration can also be passed (which overrides the Red Hat Subscription Manager configurations). The server and content URLs are usually configured in the Subscription Manager configuration by installing the katello-ca-consumer RPM before registering a system. very "there's layers to this" energy πŸ§…βœ¨

subscription-manager register --username=admin --password=secret
--org="IT Org" --environment="Library/IT" --serverurl=local-satellite.example.com --baseurl=https://local-satellite.example.com/pulp/content

If a system is in a multi-tenant environment and the organization is not provided with the registration request, registration fails with a remote server error. In the rhsm.log, there will be errors about being unable to load the owners interface. so like… pass your org, bestie πŸ’€

If a system is registered and then somehow its subscription information is lost β€” a drive crashes or the certificates are deleted or corrupted β€” the system can be re-registered, with all of its subscriptions restored, by registering with the existing ID. main character comeback arc, honestly πŸ‘‘

subscription-manager register --username=admin
--password=secret --consumerid=1234abcd

A system uses an SSL client certificate (its identity certificate) to authenticate to the subscriptions system to check for updates or changes to subscriptions. If the identity certificate is lost or corrupted, it can be regenerated using the identity command. glow-up via one command ✨

subscription-manager identity --regenerate

Appending the --force option will prompt for a username and password since these options are required when force is specified. it's giving "yes i'm sure" and then it double-checks with you πŸ™ˆ

subscription-manager identity --regenerate --force
Username: jsmith
Password:
Identity certificate has been regenerated.

When a system is ready to be shut down for an extended time or transferred to another organization, running the unregister command removes the system from the subscription management service and returns its subscriptions back to the organization for reassignment to another system. it's not goodbye, it's "your subs are needed elsewhere" πŸ˜­πŸ¦‹

subscription-manager unregister

🌸 LISTING PRODUCTS 🌸

The list command can be used to show what products are currently installed on the system. Appending --matches=SEARCH allows you to filter the list by name. obsessed with a good filter tbh πŸ”

subscription-manager list --installed --matches="*Beta"

+-------------------------------------------+
    Installed Product Status
+-------------------------------------------+

Product Name:  Red Hat Enterprise Linux for x86_64 Beta
Product ID:    486
Version:       10.0 Beta
Arch:          x86_64

βš™οΈ CHANGING SUBSCRIPTION MANAGER CONFIGURATIONS βš™οΈ

Subscription Manager uses the /etc/rhsm/rhsm.conf file for configuration, including what content and subscription management services to use. This configuration file can be edited directly, or it can be edited using the config command. Parameters and values are passed as arguments with the config command in the format --<section>.<parameter>=value , where <section> is the configuration section in the file: server, rhsm, rhsmcertd or logging. like, pick your section, bestie πŸ—‚οΈ

For example, to turn off the reporting of the system's package profile to the subscription management service:

subscription-manager config --rhsm.report_package_profile=0

The entries in the logging section are somewhat special. The keys in this section are a name of a logger. The values are the logging level. πŸ‘€

Valid levels are one of: DEBUG , INFO , WARNING , ERROR , or CRITICAL

Valid logger names are the full module path of any Subscription Manager module. For example: subscription_manager or subscription_manager.managercli

There are three main top-level loggers: subscription_manager, rhsm, and rhsm-app. All logger names begin with one of the above. the whole family tree fr fr 🌳

To set the default log level for all loggers (that are not otherwise set in the logging section), edit the default_log_level key in /etc/rhsm/rhsm.conf


🧚 UPDATING FACTS 🧚

The information about a system, such as its hardware and CPU, its operating system versions, and memory, are collected by Subscription Manager in a list of facts. Subscription Manager uses these facts to determine what purchased subscriptions are compatible with the system. Whenever these facts change (such as installing an additional CPU), the facts can be updated immediately using the facts command. tell the truth and nothing but the facts πŸ’–

subscription-manager facts --update

The collected facts can also be overridden by creating JSON files (named with a .facts extension) in the /etc/rhsm/facts/ directory. The contents of these facts files must have a simple JSON format defined by a fact and value:

{"fact1":"value1", "fact2":"value2"}

After these fact files are created, running the facts --update command will upload a new copy of the system facts including the newly added or overridden facts to the subscription management service. it ate, honestly πŸ”₯


πŸŽ€ KICKSTARTS πŸŽ€

The subscription-manager tool can be run as a post-install script during the kickstart installation process. This allows subscription management registration to be automated with system installs. automation girlies stay winning πŸ’…

%post --log=/root/ks-post.log
/usr/sbin/subscription-manager register --org="IT Dept" --activationkey=it_key --force

πŸ¦‹ PROXY CONFIGURATION πŸ¦‹

subscription-manager can be configured to use a proxy in several ways:

  • via standard HTTP_PROXY , HTTPS_PROXY , NO_PROXY environment variables (environment-level settings)
  • via options in /etc/rhsm/rhsm.conf (application-level settings)
  • via command-line arguments (command-level overrides)

Although subscription-manager respects environment variables for proxy configuration, this should still be avoided in favor of the configuration file (/etc/rhsm/rhsm.conf) for consistency and ease of maintenance across all tools and daemons. like yeah it works but please don't, bestie πŸ™

Each option of the proxy configuration (hostname, port, host/domain pattern blocklist, username, password) is read independently, with precedence being command-line over configuration over environment, and then the resulting set of options is used to configure the proxy configuration. highkey a mix-and-match situation ✨

For example, if the HTTP_PROXY environment variable is set and no_proxy is set in /etc/rhsm/rhsm.conf then both are present in the effective proxy configuration.

If two equivalent options are set in different places, then the precedence determines which value is effective.

For example, the NO_PROXY environment variable is set and the no_proxy configuration file option is set, then the value from the configuration file is the effective value. config wins, periodt πŸ‘‘


πŸ“ LOG FILES πŸ“

The default log location for subscription-manager is /var/log/rhsm/rhsm.log. When the program is run under non-root user (e.g. as dnf plugin) the logs are written to $XDG_CACHE_HOME/rhsm/rhsm.log.

If the directory isn't writable, the logs are printed to stderr. no silent suffering here, it tells you 😭


πŸ“‚ IMPORTANT FILES πŸ“‚

  • /etc/pki/consumer/*.pem
  • /etc/pki/entitlement/<serial>.pem
  • /etc/pki/product/*.pem
  • /etc/rhsm/rhsm.conf
  • /etc/rhsm/facts/*.facts
  • /var/log/rhsm/rhsm.log

πŸ•°οΈ HISTORICAL NOTES πŸ•°οΈ

The subscription-manager client tool is available on Red Hat Enterprise Linux platform version 5.7 (and newer) and version 6.1 (and newer). Older versions of RHEL should register to Red Hat Network Classic using the rhn_register client tool. ancient lore, but we respect it πŸ›οΈ

Starting in RHEL version 10, the subscription-manager client tool has been greatly simplified by eliminating the need to explicitly attach subscriptions to systems. Now obsolete, the former attach command was a primary module used in to individually assign subscription entitlements to individually registered systems. This system level procedure was required prior to an organizational election to adopt Simple Content Access. By default, Red Hat subscription services now configure all organizations to grant entitlements in a Simple Content Access mode. Monitoring the quantity of subscription consumption for procurement purposes can now be handled at an organization level by subscription utilization reporting services. Learn more about this significant simplification in Subscription Management at https://access.redhat.com/articles/simple-content-access β€” it's giving simplify, simplify, simplify 🌈


πŸ‘‘ EARLY AUTHORS πŸ‘‘

Deon Lackey, <dlackey@redhat.com>, and Pradeep Kilambi, <pkilambi@redhat.com>

⭐ CURRENT AUTHORS ⭐

CSI Client Tools Team, <csi-client-tools-bugs@redhat.com>

πŸ”— SEE ALSO πŸ”—

rhsm.conf(5), rhsm-debug(8), rhsmcertd(8) rct(8)

πŸ› BUGS πŸ›

okay bestie, real talk β€” this tool is part of Red Hat Subscription Manager, and yes, even iconic software has its moments. if you find a bug in this command-line tool (it happens, nobody's perfect πŸ’…), here's the whole vibe:

that's it. that's the whole ritual. go to the link, log in, drop your issue, and let the maintainers do their thing 🫢

ngl, please actually report it instead of just yelling into the void β€” the issue tracker is right there, and the devs can't fix what they can't see 😭

and that's a wrap on subscription-manager(8) πŸ’– you made it to the end, bestie β€” so proud of you 🌈 go forth and manage those subscriptions like the main character you are πŸ‘‘βœ¨

this page is subscription-manager(8) β€” that's the source/title right there, and the version and date live in the footer of the original doc πŸŽ€

πŸ“¦ where this page comes from