SUSE Manager/HostnameChange

From CoolSolutionsWiki

SUSE Manager Main Page

Contents

Changing the server hostname

CHANGING THE SERVER HOSTNAME IS NOT SUPPORTED !

If this procedure breaks your server, you're on your own.

Some hints

After you changed the IP address and the hostname of the server, use the following hints to fix the CA certificate and to change the hostname in SUSE Manager.

Fixing CA certificate

In case you must also fix your CA cert because of a forgotten password, you could try:

Procedure for SUSE Manager version 1.7, 2.1

   /usr/bin/rhn-ssl-tool --gen-ca --password=<MY_CA_PASSWORD> --dir="/root/ssl-build" --set-state="North Carolina" \
     --set-city="Raleigh" --set-org="Example Inc" --set-org-unit="SSL CA Unit" --force --set-common-name="<MY_FQDN>"
   /usr/bin/rhn-deploy-ca-cert.pl --source-dir /root/ssl-build --target-dir /srv/www/htdocs/pub/
   /usr/bin/rhn-ssl-tool --gen-server --password=<MY_CA_PASSWORD> --dir="/root/ssl-build" --set-state="North Carolina" \
     --set-city="Raleigh" --set-org="Example Inc." --set-org-unit="IS/IT" --set-email="admin@example.com" --set-hostname="<MY_FQDN>"
   /usr/bin/rhn-install-ssl-cert.pl --dir=/root/ssl-build/<MY_SHORT_HOSTNAME>
   /usr/bin/rhn-generate-pem.pl  --out-file=/etc/pki/spacewalk/jabberd/server.pem --ssl-dir=/root/ssl-build/<MY_SHORT_HOSTNAME>
   /usr/bin/rhn-ssl-dbstore --ca-cert=/root/ssl-build/RHN-ORG-TRUSTED-SSL-CERT
   cp /root/ssl-build/RHN-ORG-TRUSTED-SSL-CERT /usr/share/rhn/
   c_rehash
   spacewalk-service restart


These commands will create a new certificate and update configuration files in the known places (please add others if you find them here). Of course you will later need to install the new certificate on all clients.

Renaming hostname

Once the CA cert is fixed, run spacewalk-hostname-rename (found in spacewalk-utils package). This should finish with no errors and you're done.

More information about the spacewalk-hostname-rename can be found here