Difference between revisions of "SUSE Manager/HostnameChange"

From MicroFocusInternationalWiki
Jump to: navigation, search
m (more general wording)
(Fixing CA certificate)
Line 12: Line 12:
 
In case you must also fix your CA cert because of a forgotten password, you could try:
 
In case you must also fix your CA cert because of a forgotten password, you could try:
  
   mgr-ssl-tool -gen-ca --force
+
   /usr/bin/rhn-ssl-tool --gen-ca --force --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"
 +
  /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 --dir=/root/ssl-build/<MY_SHORT_HOSTNAME>
 +
  /usr/bin/rhn-ssl-dbstore --ca-cert=/root/ssl-build/RHN-ORG-TRUSTED-SSL-CERT
  
This command will at least create a new CA and set a new password.
+
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 ===
 
=== Renaming hostname ===

Revision as of 10:57, 30 October 2013

SUSE Manager Main Page

Changing the server hostname

Changing the server hostname is not supported

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

Some hints

Here are some hints that could help with changing the IP address and hostname.

Fixing CA certificate

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

 /usr/bin/rhn-ssl-tool --gen-ca --force --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"
 /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 --dir=/root/ssl-build/<MY_SHORT_HOSTNAME>
 /usr/bin/rhn-ssl-dbstore --ca-cert=/root/ssl-build/RHN-ORG-TRUSTED-SSL-CERT

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. This should finish with no errors and your done.

Note: The spacewalk-hostname-rename in SUSE Manager 1.7 is broken and there is a bugzilla open on this. The diff is below and there is a one line change you need to make before you run it, otherwise it will not work.

 diff -uprN spacewalk-hostname-rename.old spacewalk-hostname-rename
 --- spacewalk-hostname-rename.old       2012-11-02 10:43:58.000000000 -0600
 +++ spacewalk-hostname-rename   2012-11-02 10:05:38.000000000 -0600
 @@ -546,7 +546,7 @@ print_status 0  # just simulate end
 
 echo -n "Changing cobbler settings ... " | tee -a $LOG
 # --enable-tftp=no means, everything stayes configured from previous configuration
 -/usr/bin/spacewalk-setup-cobbler --enable-tftp=no >> $LOG 2>&1
 +/usr/bin/spacewalk-setup-cobbler >> $LOG 2>&1
 print_status $?
 echo -n "Changing jabberd settings ... " | tee -a $LOG