Comments on: Spacewalk/RHN Satellite Registration Script Linux. GNU. Freedom. Thu, 15 Feb 2018 18:04:15 +0000 hourly 1 By: Eric Sat, 19 Sep 2009 11:48:37 +0000 You can use rhnreg_ks instead of rhn_register. Just supply rhnreg_ks with the key from satellite server and you don't have to worry about any pop-ups or changing the up2date file. This can also force your boxes into custom channels if you use those for change control.

caveat** I changed the if/then format to make it easier to read.. might want to check the logic. I typically use && or || and long single lines, but it's hard on the eyes... Also, this is a force register so it is possible that you could double register the system. They are easy to delete though. You could put another check in for available channels or the sort to prevent that.
rpm -Uhv http://my_server/pub/rhn-org-trusted-ssl-cert-1.0-1.noarch.rpm
if [[ `uname -p|grep 64` ]]
rpm -Uhv http://my_server/pub/up2date-4.7.1-17.el4.x86_64.rpm
rpm -Uhv http://my_server/pub/up2date-4.7.1-17.el4.i386.rpm
rhnreg_ks --serverUrl=http://my_server/XMLRPM --force --activationkey=My_Activation_Key_from_Sat_Server

which yum && yum -y update || up2date -u

By: Aaron Thu, 26 Mar 2009 16:16:15 +0000 @Robin Yeah. Puppet with Cobbler is the way to go, for sure. We haven't gotten to that point yet, although it's on my radar.

@Shane Looking at DSH, and some of the others like PyDSH, it seems that you can only execute remote non-interactive commands. What if I needed to execute an interactive command on 50 servers, such as rhn_register? Is this possible with DSH?

By: Shane Thu, 26 Mar 2009 14:44:55 +0000 As an alternative to clusterssh, I'd like to suggest the Dancer Shell (dsh). I've been using that to admin 50 workstations and it doesn't have the annoyance of lots of windows appearing on my screen. I created an admin account with privileges, created a public/private keypair and put it on all the machines (that's the hardest part, but I have a script if you're interested that uses ssh and sshpass to help get past the manual part in a less secure fashion).

Now, I just do a command like "dsh -g centos-workstations yum -y update" and they all update themselves. I can also tell dsh to run them in parallel, but I usually like to see the output serially.

By: Robin Wed, 25 Mar 2009 22:15:34 +0000 I've been using puppet for this kind of thing. Basically, after setting up a new server, the first thing I do is install puppet on it, and from then on the puppet master is in control of the entire configuration.

The most useful thing with this is that should the configuration need to change, I change it in one place and over the next 30 minutes, the change is distributed.