Registering spacewalk client with spacewalk server

Here we will share the command used to register the client to register with spw server so it can receive the updates

Here is the bottom portion of the script that we use to register the client with the server

command is:

This is if client never been registered with any spw server to receive updates

rhnreg_ks --serverUrl=https://koss01-oss01-lpm01-app-1581438274.int.oss.cigar.inc/XMLRPC --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT --activationkey=1-ol-repo-cos77-gcp-kcap-grp-spw-keys

 

This command is the same and it use the "–force" flag which is usually used to re-register the client that was already registered with another server or with the same server but it was terminated and the client was removed from the spacewalk server due to inactivity.

rhnreg_ks --force --serverUrl=https://koss01-oss01-lpm01-app-1581438274.int.oss.cigar.inc/XMLRPC --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT --activationkey=1-ol-repo-cos77-gcp-kcap-grp-spw-keys

 

echo Registering client with the spw server in KOSS: koss01-oss01-lpm01-app-1581438274.int.oss.cigar.inc
rhnreg_ks --force --serverUrl=https://koss01-oss01-lpm01-app-1581438274.int.oss.cigar.inc/XMLRPC --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT --activationkey=1-ol-repo-cos77-gcp-kcap-grp-spw-keys

echo starting the osad service to re-generate new auth info
systemctl start osad

echo running the osad check command once manually to report to the reg server
rhn_check

echo System is registered with spw server and can be managed from the spw server

 

*** Note: 

If you noticed client is presenting this ssl cert located in its "/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT" location and needs to match with the server's cert otherwise it will fail to register