Error: "This system is not registered with RHN" occurs when installing a package on RHEL.
Last Updated May 18, 2018
If you are trying to perform any kind of install or upgrade in a Linux RHEL and you get the following error:
This system is not registered with RHN. RHN support will be disabled.
This means that the customer didn't register his Red Hat license or subscription in the Red Hat Network, so he won't be able to do any kind of update or online installation from the command line.
Steps to register Red Hat Enterprise Linux system to RHN:
The rhnreg_ks command is a utility for registering a system with the Red Hat Network. It is designed to be used in a non-interactive environment (a kickstart style install, for example). All the information can be specified on the command line or stdin. Generally this command is used when you have created an activation key and you want to register a system using a key.
The syntax to use the rhnreg_ks command to register a system using an activation key is the following:
The example below will register a system to RHN using the activation key 1-2b48feedf5b5a0e0609ae028d9275c93:
You can also specify username, password, and profilename.The example below will register a system to RHN with the profile name "myrhelsystem01", using an RHN username of "myusername" whose password is "mypw1234".
Note: If the RHN username and password were entered on the command line they may have been saved in the shell's history. The shell's entire history can be cleared by running the command history -c. Its possible to remove a single line from the shell's history by running the command history -d <line>. The exact line in the shell's history can be found by simply running the history command. The clear command can be issued to clear the login credentials from the screen.