Using the config Command

subscription-manager has a subcommand that can change the rhsm.conf configuration file. Almost all of the connection information used by Subscription Manager to access the subscription server, content server, and any proxies is set in the configuration file, as well as general configuration parameters like the frequency Subscription Manager checks for entitlements updates. There are major divisions in the rhsm.conf file, such as [server] which is used to configure the subscription server. When changing the Subscription Manager configuration, the settings are identified with the format section.parameter and then the new value. For example:

server.hostname=newsubscription.example.com

When changing the value for a parameter, the parameter is passed as an argument to the config command:

[root@server1 ~]# subscription-manager config --section.parameter=newValue

For example, to change the hostname of the subscription service:

[root@server1 ~]# subscription-manager config --server.hostname=subscription.example.com

All of the rhsm.conf file parameters are listed in . This is most commonly used to change connection settings:

The config command also has a --remove option. This deletes the the current value for the parameter without supplying a new parameter. A blank value tells Subscription Manager to use any default values that are set for that parameter rather than a user-defined value. For example:

[root@server1 ~]# subscription-manager config --remove=rhsm.certFrequency
The default value for rhsm.certFrequency will now be used.

If a value does not have a default, then the command returns simply that the value has been removed:

[root@server1 ~]# subscription-manager config --remove=server.proxy
You have removed the value in section server for parameter proxy.