How to register with RHN

Jephe Wu -

Objective: summarize a few ways to register RHEL5 system with RHN
Environment: RHEL5, Squid proxy, RHN

1.  Configure /etc/sysconfig/rhn/up2date first

make sure the following lines are there.

# ls -l /usr/share/rhn/RHNS-CA-CERT  [file should be present]

If you are using Squid http proxy, configure this:

2. how to identify it's Oracle Linux or RHEL

a. cat /usr/share/rhn/RHNS-CA-CERT to see it's Oracle or Redhat
b. more /etc/ or more /etc/issue
c. rpm -qi kernel to check Vendor part and Build Host

3. registration
3.1 - interactive way - rhn_register  (configure proxy in step 1 first before use, if you are using proxy. or use

rhn_register --help to specify proxy settings)

If you have already registered before and /etc/sysconfig/rhn/systemid 
exists on the system, rhn_register first asks if you are sure that 
you would like to register in this way. 

3.2 - non-interactive way - rhnreg_ks (kickstart style)

activationkey method (, need management entitlement) 
e.g. rhnreg_ks --profilename=jephe --activationkey=1-2b48feedf5b5a0e0609ae028d9275c93

username/password method (for security reason, you need to clear history commands, use history -d or history -c and clear commands)
e.g. rhnreg_ks --profilename "jephe" --username "username" --password "password" [--force]

4. references
a. RHN FAQ -
b. How to register with RHN -
c. rhnreg_ks command: -
d. using rhn_register, up2date or yum to access RHN, RHN Satellite or RHN proxy via an HTTP proxy
e. activationkey (, need management entitlement)
f. difference between all kinds of entitlements: