1 out of 2 rated this helpful Rate this topic

The Certificate Name Does Not Match the Hostname

Updated: August 10, 2009

Applies To: Operations Manager 2007 R2

Cross Platform Extensions uses an SSL Certificate for WS-Management Communication between the Operations Manager management server and the remote UNIX or Linux computer. For this certificate to be valid, the common name (CN) that is used in the certificate must match the fully qualified domain name (FQDN) that is resolved by Operations Manager.  If the CN does not match, you will see the following error when you run the Discovery Wizard:

The SSL certificate contains a common name (CN) that does not match the hostname

You can view the basic details of the certificate on the UNIX or Linux computer by entering the following command:

openssl x509 -noout -in /etc/opt/microsoft/scx/ssl/scx.pem -subject -issuer -dates

When you do this, you will see output that is similar to the following:

subject= /DC=name/DC=newdomain/CN=newhostname/CN=newhostname.newdomain.name
issuer= /DC=name/DC=newdomain/CN=newhostname/CN=newhostname.newdomain.name
notBefore=Mar 25 05:21:18 2008 GMT
notAfter=Mar 20 05:21:18 2029 GMT

Validate the hostnames and dates and ensure that they match the name being resolved by the Operations Manager management server.

If the hostnames do not match, use one of the following actions to resolve the issue:

  • If the UNIX or Linux hostname is correct but the Operations Manager management server is resolving it incorrectly, either modify the DNS entry to match the correct FQDN or add an entry to the hosts file on the Operations Manager server.

  • If the UNIX or Linux hostname is incorrect, do one of the following:

    • Change the hostname on the UNIX or Linux host to the correct one and create a new certificate.

    • Create a new certificate with the desired hostname.

To Change the Name on the Certificate:

If the certificate was created with an incorrect name, you can change the host name and re-create the certificate and private key. To do this, run the following command on the UNIX or Linux computer:

/opt/microsoft/scx/bin/tools/scxsslconfig -f -v

The –f option forces the files in /etc/opt/microsoft/scx/ssl to be overwritten.

You can also change the hostname and domain name on the certificate by using the –h and –d switches, as in the following example:

/opt/microsoft/scx/bin/tools/scxsslconfig -f -h <hostname> -d <domain.name>

Restart the agent by running the following command:


/opt/microsoft/scx/bin/tools/scxadmin -restart

To add an entry to the hosts file:

If the FQDN is not in Reverse DNS, you can add an entry to the hosts file located on the management server to provide name resolution. The hosts file is located in the \Windows\System32\Drivers\etc folder.  An entry in the hosts file is a combination of the IP address and the FQDN.

For example, to add an entry for the host named “newhostname.newdomain.name” with an IP address of 192.168.1.1, add the following to the end of the hosts file:

192.168.1.1     newhostname.newdomain.name
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Display ok but Config not okay
Hi Stefan,

Yes the result you display are correct as I have the same one on working machines, but how do you obtain them as the openssl x509 is just a display?.
BUT from the command http://technet.microsoft.com/en-us/library/dd891009.aspx

opmgrms1 is the management server
rbticdb1 is the linux machine

/opt/microsoft/scx/tools/scxsslconfig -f -h opmgrms1 -d ad.xxx
I have
subject= /DC=xxx/DC=ad/CN=opmgrms1/CN=opmgrms1.ad.xxx
issuer= /DC=xxx/DC=ad/CN=opmgrms1/CN=opmgrms1.ad.xxx
which seems wrong as it does not work

/opt/microsoft/scx/tools/scxsslconfig -f -v
I have
subject= /DC=xxx/DC=ad/CN=rbticdb1/CN=rbticdb.ad.xxx
issuer= /DC=xxx/DC=ad/CN=rbticdb1/CN=rbticdb1.ad.xxx
which seems wrong as it does not work

when pushed from the server it is another parameter:
subject= /DC=edu/DC=ucla/DC=medctr/DC=ad/CN=mbticdb1/CN=mbticdb1.ad.medctr.ucla.edu
issuer= /CN=SCX-Certificate/title=SCX633376D2-E3E2-4f31-8461-D09259ACEF3D/DC=OPMGRMS1
notBefore=Mar 8 23:14:05 2009 GMT
notAfter=Mar 8 23:18:57 2020 GMT

Which format is correct?

How to fix the wrong certificate if I could not push them from the server?

Thanks,
Dom
another tip to troubleshoot certificates
What I usually do: use WinSCP or any other method to COPY the ".pem" file to windows, rename it to ".cer", and use the familiar GUI to check how it looks like.
On http://www.muscetta.com/2008/05/04/testing-system-center-cross-plaform-extentions/ I wrote "[...] Of course you have to solve some other things such as DNS resolution AND trusting the self-issued certificates that the agent uses, first. Once you have done that, you can run test queries from the Windows box towards the Unix ones by using WinRM [...]" - that's what I meant!
Correct syntax to check if Common Name is correct

Instead of above syntax use the next syntax:

openssl x509 –noout –in /etc/opt/microsoft/scx/ssl/scx.pem -subject -issuer –dates

Example result:
[root@redhat53 ssl]# openssl x509 -noout -in /etc/opt/microsoft/scx/ssl/scx.pem -subject -issuer -dates
subject= /CN=redhat53.opsmgrdemo/CN=redhat53.opsmgrdemo
issuer= /CN=SCX-Certificate/title=SCX633376D2-E3E2-4f31-8461-D09259ACEF3D/DC=OPSMGRR2RMS
notBefore=May 27 23:13:38 2008 GMT
notAfter=May 27 16:17:11 2019 GMT


Regards,
Stefan Stranger
Microsoft Services