Quick Registration for RHEL
quickly register and subscribe Red Hat Enterprise Linux systems
Abstract
yum) to help install and update content on the local system.
1. Using Red Hat Subscription Manager Tools
Note
root because of the nature of the changes to the system. However, Red Hat Subscription Manager connects to the subscription service as a user account for the subscription service.
1.1. Launching the Red Hat Subscription Manager UI
[root@server1 ~]# subscription-manager-gui
1.2. Running the subscription-manager Command-Line Tool
subscription-manager tool. This tool has the following format:
[root@server1 ~]# subscription-manager command [options]
subscription-manager help and manpage have more information.
Table 1. Common subscription-manager Commands
| Command | Description |
|---|---|
| register | Registers or identifies a new system to the subscription service. |
| unregister | Unregisters a machine, which strips its subscriptions and removes the machine from the subscription service. |
| attach | Attaches a specific subscription to the machine. |
| redeem | Auto-attaches a machine to a pre-specified subscription that was purchased from a vendor, based on its hardware and BIOS information. |
| remove | Removes a specific subscription or all subscriptions from the machine. |
| list | Lists all of the subscriptions that are compatible with a machine, either subscriptions that are actually attached to the machine or unused subscriptions that are available to the machine. |
2. Registering and Unregistering a System
2.1. Registering from the UI
- Launch Subscription Manager. For example:
[root@server ~]# subscription-manager-gui
- If the system is not already registered, then there will be a button at the top of the window in the top right corner of the My Installed Products tab.

- To identify which subscription server to use for registration, enter the hostname of the service. The default service is Customer Portal Subscription Management, with the hostname subscription.rhn.redhat.com. To use a different subscription service, such as Subscription Asset Manager, enter the hostname of the local server.
There are several different subscription services which use and recognize certificate-based subscriptions, and a system can be registered with any of them in firstboot:- Customer Portal Subscription Management, hosted services from Red Hat (the default)
- Subscription Asset Manager, an on-premise subscription server which proxies content delivery back to the Customer Portal's services
- Satellite 6, an on-premise service which handles both subscription services and content delivery
- Enter the user credentials for the given subscription service to log in.
The user credentials to use depend on the subscription service. When registering with the Customer Portal, use the Red Hat Network credentials for the administrator or company account.However, for Subscription Asset Manager or Satellite 6, the user account to use is created within the on-premise service and probably is not the same as the Customer Portal user account. - Optionally, select the Manually assign subscriptions after registration checkbox.By default, the registration process automatically attaches the best-matched subscription to the system. This can be turned off so that the subscriptions can be selected manually, as in Section 3, “Attaching and Removing Subscriptions”.
- When registration begins, Subscription Manager scans for organizations and environments (sub-domains within the organization) to which to register the system.
IT environments that use Customer Portal Subscription Management have only a single organization, so no further configuration is necessary. IT infrastructures that use a local subscription service like Subscription Asset Manager might have multiple organizations configured, and those organizations may have multiple environments configured within them.If multiple organizations are detected, Subscription Manager prompts to select the one to join.
- With the default setting, subscriptions are automatically selected and attached to the system. Review and confirm the subscriptions to attach to the system.
- If prompted, select the service level to use for the discovered subscriptions.

- Subscription Manager lists the selected subscription. This subscription selection must be confirmed by clicking the button for the wizard to complete.

2.2. Registering from the Command Line
register command with the user account information required to authenticate to Customer Portal Subscription Management. When the system is successfully authenticated, it echoes back the newly-assigned system inventory ID and the user account name which registered it.
register options are listed in Table 2, “register Options”.
Example 1. Registering a System to the Customer Portal
[root@server1 ~]# subscription-manager register --username admin-example --password secret The system has been registered with id: 7d133d55-876f-4f47-83eb-0ee931cb0a97
Example 2. Automatically Subscribing While Registering
register command has an option, --auto-attach, which allows the system to be registered to the subscription service and immediately attaches the subscription which best matches the system's architecture, in a single step.
[root@server1 ~]# subscription-manager register --username admin-example --password secret --auto-attachTable 2. register Options
| Options | Description | Required |
|---|---|---|
| --username=name | Gives the content server user account name. | Required |
| --password=password | Gives the password for the user account. | Required |
| --serverurl=hostname | Gives the hostname of the subscription service to use. The default is for Customer Portal Subscription Management, subscription.rhn.redhat.com. If this option is not used, the system is registered with Customer Portal Subscription Management. | Required for Subscription Asset Manager or Satellite 6 |
| --baseurl=URL | Gives the hostname of the content delivery server to use to receive updates. Both Customer Portal Subscription Management and Subscription Asset Manager use Red Hat's hosted content delivery services, with the URL https://cdn.redhat.com. Since Satellite 6 hosts its own content, the URL must be used for systems registered with Satellite 6. | Required for Satellite 6 |
| --org=name | Gives the organization to which to join the system. | Required, except for hosted environments |
| --environment=name | Registers the system to an environment within an organization. | Optional |
| --name=machine_name | Sets the name of the system to register. This defaults to be the same as the hostname. | Optional |
| --auto-attach | Automatically attaches the best-matched compatible subscription. This is good for automated setup operations, since the system can be configured in a single step. | Optional |
| --activationkey=key | Attaches existing subscriptions as part of the registration process. The subscriptions are pre-assigned by a vendor or by a systems administrator using Subscription Asset Manager. | Optional |
| --servicelevel=None|Standard|Premium | Sets the service level to use for subscriptions on that machine. This is only used with the --auto-attach option. | Optional |
| --release=NUMBER | Sets the operating system minor release to use for subscriptions for the system. Products and updates are limited to that specific minor release version. This is used only used with the --auto-attach option. | Optional |
| --force | Registers the system even if it is already registered. Normally, any register operations will fail if the machine is already registered. | Optional |
2.3. Registering a System to Subscription Asset Manager
- Install the configuration RPM to configure Red Hat Subscription Manager to point to the Subscription Asset Manager instance. Every Subscription Asset Manager server has a configuration RPM available at a standard URL:
http://sam_server_hostname/pub/candlepin-cert-consumer.noarch.rpm
For example:[root@server ~]# rpm -ivh http://sam.example.com/pub/candlepin-cert-consumer.noarch.rpm
- Register the system using the
subscription-managercommand. The organization name is required; if the username or password are not passed with the command, then the command prompts for them. Using--auto-attachto apply subscriptions automatically is not required, but it simplifies setting up the new system.[root@server ~]# subscription-manager register --username=jsmith --password=secret --org="IT Dept" --auto-attach
This command must be run as root.
2.4. Unregistering
unregister command. This removes the system's entry from the subscription service, removes any subscriptions, and, locally, deletes its identity and subscription certificates.
unregister command.
Example 3. Unregistering a System
[root@server1 ~]# subscription-manager unregister
- Open the Subscription Manager UI.
[root@server ~]# subscription-manager-gui
- Open the System menu, and select the item.

- Confirm that the system should be unregistered.
3. Attaching and Removing Subscriptions
3.1. Attaching and Removing Subscriptions through the UI
3.1.1. Attaching a Subscription
- Launch Subscription Manager. For example:
[root@server ~]# subscription-manager-gui
- Open the All Available Subscriptions tab.
- Optionally, set the date range and click the button to set the filters to use to search for available subscriptions.
Subscriptions can be filtered by their active date and by their name. The checkboxes provide more fine-grained filtering:- match my system shows only subscriptions which match the system architecture.
- match my installed products shows subscriptions which work with currently installed products on the system.
- have no overlap with existing subscriptions excludes subscriptions with duplicate products. If a subscription is already attached to the system for a specific product or if multiple subscriptions supply the same product, then the subscription service filters those subscriptions and shows only the best fit.
- contain the text searches for strings, such as the product name, within the subscription or pool.
After setting the date and filters, click the button to apply them. - Select one of the available subscriptions.

- Click the button.
3.1.2. Removing Subscriptions
- Launch Subscription Manager. For example:
[root@server ~]# subscription-manager-gui
- Open the My Subscriptions tab.All of the active subscriptions to which the system is currently attached are listed. (The products available through the subscription may or may not be installed.)

- Select the subscription to remove.
- Click the button in the bottom right of the window.
3.2. Attaching and Removing Subscriptions through the Command Line
3.2.1. Attaching Subscriptions
--pool option.
[root@server1 ~]# subscription-manager attach --pool=XYZ01234567
attach command are listed in Table 3, “attach Options”.
list command:
[root@server1 ~]# subscription-manager list --available
+-------------------------------------------+
Available Subscriptions
+-------------------------------------------+
ProductName: RHEL for Physical Servers
ProductId: MKT-rhel-server
PoolId: ff8080812bc382e3012bc3845ca000cb
Quantity: 10
Expires: 2011-09-20--auto option (which is analogous to the --auto-attach option with the register command).
[root@server1 ~]# subscription-manager attach --auto
Table 3. attach Options
| Options | Description | Required |
|---|---|---|
| --pool=pool-id | Gives the ID for the subscription to attach to the system. | Required, unless --auto is used |
| --auto | Automatically attaches the system to the best-match subscription or subscriptions. | Optional |
| --quantity=number | Attaches multiple counts of a subscription to the system. This is used to cover subscriptions that define a count limit, like using two 2-socket server subscriptions to cover a 4-socket machine. | Optional |
| --servicelevel=None|Standard|Premium | Sets the service level to use for subscriptions on that machine. This is only used with the --auto option. | Optional |
3.2.2. Removing Subscriptions from the Command Line
remove command with the --all option removes every product subscription and subscription pool that is currently attached to the system.
[root@server1 ~]# subscription-manager remove --all
remove command by referencing the ID number of that X.509 certificate.
- Get the serial number for the product certificate, if you are removing a single product subscription. The serial number can be obtained from the subscription#
.pemfile (for example,392729555585697907.pem) or by using thelistcommand. For example:[root@server1 ~]# subscription-manager list --consumed +-------------------------------------------+ Consumed Product Subscriptions +-------------------------------------------+ ProductName: High availability (cluster suite) ContractNumber: 0 SerialNumber: 11287514358600162 Active: True Begins: 2010-09-18 Expires: 2011-11-18 - Run the subscription-manager tool with the
--serialoption to specify the certificate.[root@server1 ~]# subscription-manager remove --serial=11287514358600162
4. Redeeming Vendor Subscriptions
4.1. Redeeming Subscriptions through the UI
Note
- Launch Subscription Manager. For example:
[root@server ~]# subscription-manager-gui
- If necessary, register the system, as described in Section 2.1, “Registering from the UI”.
- Open the menu in the top left of the window, and click the item.

- In the dialog window, enter the email address to send the notification to when the redemption is complete. Because the redemption process can take several minutes to contact the vendor and receive information about the pre-configured subscriptions, the notification message is sent through email rather than through the Subscription Manager dialog window.

- Click the button.
4.2. Redeeming Subscriptions through the Command Line
Note
redeem command, with an email address to send the redemption email to when the process is complete.
# subscription-manager redeem --email=jsmith@example.com
5. Attaching Subscriptions from a Subscription Asset Manager Activation Key
# subscription-manager register --username=jsmith --password=secret --org="IT Dept" --activationkey=abcd1234
6. Setting Preferences for Systems
- Service levels for subscriptions
- The operating system minor version (X.Y) to use
6.1. Setting Preferences in the UI
- Open the Subscription Manager.
- Open the System menu.
- Select the System Preferences menu item.

- Select the desired service level agreement preference from the drop-down menu. Only service levels available to the Red Hat account, based on all of its active subscriptions, are listed.
- Select the operating system release preference in the Release version drop-down menu. The only versions listed are Red Hat Enterprise Linux versions for which the account has an active subscription.

- The preferences are saved and applied to future subscription operations when they are set. To close the dialog, click .
6.2. Setting Service Levels Through the Command Line
service-level --set command.
Example 4. Setting a Service Level Preference
--list option with the service-level command.
[root@server ~]# subscription-manager service-level --list
+-------------------------------------------+
Available Service Levels
+-------------------------------------------+
Standard
None
Premium
Self-Support[root@server ~]# subscription-manager service-level --set=self-support Service level set to: self-support
--show option:
[root#server ~]# subscription-manager service-level --show Current service level: self-support
register and attach commands have the --servicelevel option to set a preference for that action.
Example 5. Autoattaching Subscriptions with a Premium Service Level
[root#server ~]# subscription-manager attach --auto --servicelevel Premium Service level set to: Premium Installed Product Current Status: ProductName: RHEL 6 for Workstations Status: Subscribed
Note
--servicelevel option requires the --auto-attach option (for register) or --auto option (for attach). It cannot be used when attaching a specified pool or when importing a subscription.
6.3. Setting a Preferred Operating System Release Version in the Command Line
yum update and move from version to version.
Example 6. Setting an Operating System Release During Registration
--release option with the register. This applies the release preference to any subscriptions selected and auto-attached to the system at registration time.
--auto-attach option, because it is one of the criteria used to select subscriptions to auto-attach.
[root#server ~]# subscription-manager register --auto-attach --release=6.4 --username=admin@example.com...Note
attach command.
Example 7. Setting an Operating System Release Preference
release command can display the available operating system releases, based on the available, purchased (not only attached) subscriptions for the organization.
[root#server ~]# subscription-manager release --list
+-------------------------------------------+
Available Releases
+-------------------------------------------+
6.2
6.3--set then sets the preference to one of the available release versions:
[root#server ~]# subscription-manager release --set=6.3 Release version set to: 6.3
7. Managing Subscription Expiration and Notifications

Figure 2. Valid Until...

Figure 3. Color-Coded Status Views
[root@server ~]# subscription-manager list
+-------------------------------------------+
Installed Product Status
+-------------------------------------------+
ProductName: Red Hat Enterprise Linux Server
Status: Not Subscribed
Expires:
SerialNumber:
ContractNumber:
AccountNumber:
Figure 4. Subscription Notification Icon

Figure 5. Subscription Warning Message

Figure 6. Autoattach Button
8. Revision History
| Revision History | |||
|---|---|---|---|
| Revision 1.3-5 | September 18, 2013 | ||
| |||

