How to register and subscribe a system to the Red Hat Customer Portal using Red Hat Subscription-Manager

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux(RHEL) 5.7 and newer
  • Red Hat Enterprise Linux(RHEL) 6.1 and newer
  • Red Hat Enterprise Linux(RHEL) 7.0 and newer
  • Red Hat Subscription Management
  • Red Hat Subscription-Manager
  • Red Hat Customer Portal

Issue

  • How to register a new Red Hat Enterprise Linux system to the Customer Portal using Red Hat Subscription-Manager
  • How to un-register a system using Red Hat Subscription-Manager
  • How to register a Red Hat Enterprise Linux server to a specific subscription using its pool-id
  • How to update or migrate registered server from RHN Classic to RHSM?
  • What is Subscription-Manager and how do I register a RHEL system so that I can install packages or updates with yum?
  • How do I register my system to RHSM using Subscription-Manager, to be able to install packages using yum?
  • We are not able to install the packges from yum, how to register a system to RHSM to access the packages?
  • I'm trying to find rhn_register with RHEL 7.0 but it's missing. How do I register a RHEL7 server for updates?
  • How to register with rhsm

Resolution

Red Hat Subscription Management allows users to track their subscription quantity and consumption.

NOTE: With Red Hat Subscription-Manager, registration and utilization of a subscription is actually a two-part process.
First register a system, then apply a subscription.

Red Hat Labs Registration Assistant

We have an online tool to assist you in selecting the most appropriate registration technology for your system. If you would prefer to use this tool, please visit https://access.redhat.com/labs/registrationassistant/.

Register and automatically subscribe in one step

Use the following command to register the system, then automatically associate any available subscription matching that system:

# subscription-manager register --username <username> --password <password> --auto-attach

If the command is unable to attach a subscription, it will indicate that in the output. Then, you can attach the subscription from the Customer Portal, instead (see the next section).

Register first, then attach a subscription in the Customer Portal

Use the following command to register a system without immediately attaching a subscription:

# subscription-manager register

Attach a specific subscription through the Customer Portal

After registration, you can assign a subscription to the registered system from the Customer Portal by referring this article.

  • After this, refresh the information on your machine using the following command. Be sure to run this any time you add or change the attached subscription from the Customer Portal:
# subscription-manager refresh

Attach a subscription from any available that match the system

After registration, use the following command to attach any available subscription that matches the current system.

# subscription-manager attach --auto

Register with a specific pool

After registration, use the following command to attach a subscription from a specific pool:

# subscription-manager attach --pool=<POOL_ID>

(You can find which pools are available with subscription-manager list --available)
Note: With subscription-manager-1.1.9-1 or later, attach option has been replacing the subscribe option. For more information, please refer to following article: RHBA-2013-0350

If you are not sure of the pool ID needed, these and details such as expiration dates can be viewed using the following command:

# subscription-manager list --available --all

Using Virtual Data Center? You may find this solution helpful: How to subscribe a VMware or Hyper-V guest using "Red Hat Enterprise Linux for Virtual Datacenter subscription"

Registration via GUI

# subscription-manager-gui
  • Systems can also be registered with Customer Portal Subscription Management during the firstboot process or as part of the kickstart setup (both described in the Installation Guide)

Connecting through a HTTP Proxy or Firewall

Offline Registration

Some systems may not have internet connectivity, but administrators still want to attach and track the subscriptions for that system. This can be done by manually registering the system using the Customer Portal.

Unregistering a system

# subscription-manager remove --all
# subscription-manager unregister
# subscription-manager clean

Also see How to delete System Profiles for those registered with Red Hat Subscription Manager (RHSM)?

Migrating from RHN Classic to RHSM

Troubleshooting

Having trouble? Please see these solutions for first steps to resolve common issues:
* How to troubleshoot subscription-manager and yum issues
* RHSM Subscription Issues Troubleshooting Do's and Don'ts

RHEL Systems Registration Guide

  • This document is part of a collection covering RHEL System Registration.
    • If this is not the right solution for your registration needs or;
    • If you wish to make a different registration choice;

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

64 Comments

There is no mention of the "unsubscribe" command in the man page (manual) of subscription-manager. The command "subscription-manager unsubscribe --all" works, but is undocumented. Was this command deprecated, and replaced with the "remove" command?

Hi,
I tried the subscription-manager but it is coming up with command not found.

What am I doing wrong?

/usr/sbin/subscription-manager

I have the same problem.
I checked my $PATH.
/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/castor/bin:
I also tried typing:
/usr/sbin/subscription-manager status
I got:
bash: /usr/sbin/subscription-manager: No such file or directory

Hi Andy, Are you trying it in google cloud this what I got when I tried it in google cloud just install it :). it should work.

I've registered the system but it can't be subscribed and I got this message
"This system is registered to Red Hat Subscription Management, but is not receiving updates. You can use subscription-manager to assign subscriptions."

Could you please help me with this issue?

Any update on this issue??

Please help...

Enter this command: #subscription-manager refresh

I have that same problem, "#subscription-manager refresh" does not help : "Ce système n'est pas encore enregistré. Essayez 'subscription-manager register --help' pour obtenir plus d'informations." (that system is not registered yet, try subscription-manager register --help' to get more information)

Solution found (from RHEL 7.5), see https://access.redhat.com/solutions/447243#comment-1450631

Ditto Newbie above...
https://access.redhat.com/solutions/637583
How do I upgrade from Red Hat Enterprise Linux 6 to Red Hat Enterprise Linux 7?
So, being a RHEL6 user, and having used rhn_register, I decided to follow
the path to:
How to Unregister a System from RHN Classic or a Satellite

https://access.redhat.com/solutions/224973

Where I was greeted by the "warm and friendly".
Access denied

You do not have permission to access the page you requested. If this is knowledge content, it may be unpublished or retired. Documents may be retired when they are outdated, duplicated, or no longer necessary. Please try searching the Customer Portal for the most current, published information.
Please advise! I have several production systems that are registered
this old way (rhn_register), so I need to update this stuff, even if I don't
try an in-place upgrade.

Cheers,
--ldl

Any solution on this? I have a completely new Virtual machine running RHEL7, when I run the subscription-manager no error appears, but i got this when I list the susbcription:

The system has been registered with ID: 8xxxxxx-xxxxx-4001-aa39-xxxxxx
Installed Product Current Status:
Product Name: Red Hat Enterprise Linux Server
Status: Not Subscribed

+-------------------------------------------+
Installed Product Status
+-------------------------------------------+
Product Name: Red Hat Enterprise Linux Server
Product ID: 69
Version: 7.0
Arch: x86_64
Status: Not Subscribed
Status Details: Not supported by a valid subscription.
Starts:
Ends:

I cannot use YUM with RH repos. weird!

I have registered my system, but after system update, I can not start the system. So I restored the system. However, I can not register my system now. What should I do to reregister my system? thanks!

I have installed the RHEL7 on VMware Player an subscribed successed at begin.
But after deleted and re-install the RHEL7 on VM again.
I do not know the system need to Unregister the subscription at first,
And then after re-install the RHEL7 on VM now that not allow to subscribion again.

I would suggest small improvement here. It would be nice to mention/highlight two possible options in the beginning. Terminal and GUI. I think it might be useful for customers to see it directly.

There is no attach option for subscription-manager in RHEL 6.3. The correct command is:

subscription-manager subscribe --pool=[pool_id]

Under Unsubscribing a system the remove option does not exist in RHEL 6.3. Correct command is:

subscription-manager unsubscribe --all

Sir,

i have registered with RHEL 6.3 version. But the systemhas gone bad. i want to use it on the other system. what is the procedure.

For anyone looking at this in the future:

1 Unregister the system that has gone bad either via Portal or CLI. 2 Register the new system and attach this sub on the new system.

Hello Sivakumar,

Can you still access the RHEL 6.3 system that went bad, or is it completely inaccessible?

If you can't access the system, then try deleting the system from the Red Hat Portal -> Subscriptions -> Under Red Hat Subscription Management -> Under Subscriber Inventory -> Click on "Systems" to access the inventory -> Click the check box next to the system, and select "Delete Selected".

If you can access the broken system, then do the following:

$> subscription-manager unsubscribe --all
$> subscription-manager unregister
$> subscription-manager clean

Verify it is no longer consuming subscriptions:

$> subscription-manager list --consumed
Should show nothing consumed

$> subscription-manager list
Should show unsubscribed

For additional instructions on registering, unregistering, and reregistering a system using Red Hat Subscription Management, for more information please refer to Red Hat Enterprise Linux Deployment Guide and Red Hat Subscription Management documentation.

LINK Red Hat Enterprise Linux Deployment Guide
Not Found

The requested URL /access.redhat.com/site/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/registering-machine-ui.html was not found on this server.

Thank you Markus,

I've updated those links.

Very best regards,
Mark

We still have an unregistered system (Red Hat Enterprise Linux Server release 5.1 (Tikanga)). Howto register?
subscription-manager commands does not work.....

I am having an issue registering our RHEL 6.6 because our password has an exclamation mark in it. When I try to issue the command I get an error "-bash: !12: event not found". I have tried surrounding the password in quotation marks "" but same result. Please help. Thank you.

Use backslash to "escape" special characters in password.

I found that if I surround the password in single quote marks ' ' the password is accepted. My system is now registered. Thank you.

The system is registered:

subscription-manager register --username domain.tld --password mypwd --auto-attach

This system is already registered. Use --force to override

subscription-manager attach --auto

Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Not Subscribed

Unable to find available subscriptions for all your installed products.

No clue where to go from here. I updated most of this formerly RH v6.1 machine yesterday, but now I can do nothing to finish the updates.

RHEL 5.11 subscription-manager "command not found"
To fix:
1) rhn_register #make sure you are registered to download/install packages for RHEL
2) yum install subscription-manager subscription-manager-migration subscription-manager-migration-data
3) rhn-migrate-classic-to-rhsm

How do I know my POOL_ID?

How do I register a system that in not on the Internet and never will be?

Duane,

For on-premise subscription management, Red Hat provides Subscription Asset Manager (SAM) included with the RHEL subscription. SAM is established in the customer environment. Using the Customer Portal entitlements are placed in a manifest associated with a SAM distribution. The manifest is then loaded into SAM. The same subscription service hosted by Red Hat in the Portal is available in SAM. System then register to SAM and consume the subscription entitlements. SAM also provides a single connection to the Red Hat Content Delivery Network so local systems can get updates. Please see Red Hat documentation:

https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html-single/Using_Subscription_Asset_Manager/index.html

I keep getting "Network error, unable to connect to server. Please see /var/log/rhsm/rhsm.log for more information." The log contains error messages: "[ERROR] subscription-manager:56570 @managercli.py:160 - Error during registration: [Errno -5] No address associated with hostname" and "[ERROR] subscription-manager:56570 @managercli.py:161 - [Errno -5] No address associated with hostname". Which hostname: my server's, or the Red Hat server that the subscription manager is trying to reach? And is it the IP address or some other protocol address? Thanks for any light you can shed.

Excellent experience.

Use backslash to "escape" special characters in password.

++ lmathey-usu Also, It would be good to add this info to the "Register and automatically subscribe in one step" section as password is being input via CLI in that example.

For interactive registration or via GUI this wouldn't be a problem.

Hello,

I've subscribed my servers, and after a while, they appear as unsubscribed, so I decided to investigate. I unsubscribed and cleaned one of them, and subscribed again with subscription-manager register --auto-attach which output was The system has been registered with ID: XXXXXXXXXXXXXXXXXXXXXXXXXX Installed Product Current Status: Product Name: Red Hat Enterprise Linux Server Status: Subscribed

I did a subscription-manager refresh and then a subscription-manager list, which gave me +-------------------------------------------+ Installed Product Status +-------------------------------------------+ Product Name: Red Hat Enterprise Linux Server Product ID: 69 Version: 5.11 Arch: x86_64 Status: Subscribed Status Details: Starts: 02/22/2016 Ends: 05/06/2016

The question is, why subscription ends in a month from now, when I have a yearly subscription? There's something I should run periodically to refresh the subscription? I can't found nothing on the manuals.

This did not resolve the issue I am experiencing. My system is subscribed, but subscription-manager does not find the one valid subscription that I currently have. So, it continues to report, "Unable to find available subscriptions for all your installed products."

How do you do this when the system is unable to get direct to the internet?

Maybe use proxy. For example --proxy=your-proxy.ip.address.here:port

If you are going via Proxy then you could either configure the http and https proxy at host level or use the other options listed below.

1 To configure the proxy for subscription-manager:
subscription-manager config --server.proxy_hostname=proxy.example.com --server.proxy_port=8080 --server.proxy_user=admin --server.proxy_password=secret
2 To configure the proxy for yum, Set the below in /etc/yum.conf
proxy=https://<Proxy-Server-IP-Address>:<Proxy_Port>
proxy_username=<Proxy-User-Name>
proxy_password=<Proxy-Password> 
3 To configure http and https proxy at host level set the following environment variables either via “/root/.bashrc” or via /etc/environment (you need to source these env variables)
export http_proxy=http://{Proxy-User-Name}:{Proxy-Password}@<Proxy-Server-IP-Address>:<Proxy-Port>
export https_proxy= http://{Proxy-User-Name}:{Proxy-Password}@<Proxy-Server-IP-Address>:<Proxy-Port>
export ftp_proxy= http://{Proxy-User-Name}:{Proxy-Password}@<Proxy-Server-IP-Address>:<Proxy-Port>
export no_proxy=127.0.0.1,localhost

This wasn't helpful, because I don't have subscription-manager installed on Red Hat 5.9

I need to register an offline system. No help here.

Time to dump Red Hat stock. I've noticed that Red Hat employees are no longer answering these posts. Help links are dead.
It would appear that no $$ are being funneled into support.

Hi John,

If you require Red Hat support and have an active subscription, I'd encourage you to open a support case. Alternately, you can try posting in the Discussions forum. All the links in this solution appear to be working correctly, but if you can point towards any specific problems I'd be happy to get them fixed.

Added the following, hopefully it helps address some of the questions:

  • how to find pool ID
  • registering an offline system to Customer Portal Subscription Management
  • RHSM Subscription Issues Troubleshooting Do's and Don'ts

I am not able to update security patches I register the system but when give command subscription-manager list --consumed it gives the message "No Consumed subscription pools to list" Please tell me how i update the security patches

UUID has been changed.... How to re-regitsre system?

I am not able to update security patches I register the system but when give command subscription-manager list --consumed it gives the message "No Consumed subscription pools to list" Please tell me how i update the security patches

This documentation does not match your site: https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/registering-offline

How do I actually register and entitle an offline system? I have no idea.

Hi John, you are correct, that doc is out of date - we apologize and will be addressing this. If you have not received help already, this solution should tell you what you need to know. https://access.redhat.com/solutions/3121571

thanakou

Perfect!!!.. i was looking for this information from a long time.

It's just amazing, i have done it with Rhel 7.4 :)

All this response and chatter below means subscription-manager is not working. Red Hat - PLEASE FIX IT.

Hi Kenny,

Can you describe the issue you are actually facing? Also, can you open a Case with Support Team if you are still experiencing this issue.

Thanks!

After following all steps, I still get "installing not available" when I try to install an app. I'm not sure if it's because app is not in the only repository that is enabled. The apps are present in the Application Installer, so I figure they must be in the repository. I tried to install Chromium Browser, which I might expect not to be in the repository, and "kate" (text editor), which I thought would be more likely to be in the repository.

Hi Steve, for Chrome please see https://access.redhat.com/solutions/523213 and 'kate' is available through RHEL optional repository.

If you want to have support pay for it, that command never will work for 30 day trial. Nice experience

QEMU: Checking for hardware virtualization : FAIL (Only emulated CPUs are available, performance will be significantly limited) Any help pls?

Hi Richard, I might be mistaken but this Warning does not seem to be directly related to this Article. In case you need further assistance I would suggest to Open a Support Case and all the information related to your issue and your current context.

getting a errno -2 when I try to attach from a vm redHat 8 install

Where do you even submit this command. So much information missing from this post.

You run it in a terminal session of the system you're trying to do this on, as the root user.

Please provide below commands username and password subscription-manager register --username --password --auto-attach