Wednesday, June 4, 2014

Weather Information


Northern Hemisphere:

Winter: December 21- March 21
Spring: March 21- June 21
Summer: June 21- September 22
Fall: September 22- December 21.

Southern Hemisphere:

Winter: June 21- September 22
Spring: September 22- December 21
Summer: December 21- March 21
Fall: March 21- June 21

Friday, April 11, 2014

OpenSSL: How do I verify that a private key matches a certificate

To verify that a private key matches its certificate you need to compare the modulus of the certificate against the modulus of the private key.

Please follow the below command to view the modulus of the certificate.
openssl x509 -noout -modulus -in server.crt | openssl md5

Now you will receive the modulus something like a77c7953ea5283056a0c9ad75b274b96

Please follow the below command to view the modulus of the private key.
openssl rsa -noout -modulus -in myserver.key | openssl md5

Now you should get the modulus as same as certificate modulus above. i.ea77c7953ea5283056a0c9ad75b274b96

If the modulus of the certificate and the modulus of the private key do not match, then you're not using the right private key. You can either create a brand new key and CSR and send contact support or do a search for all private keys on the system and compare their modulus.

Please follow the below command to search for all private keys on your server .
find / -name *.key

Thursday, April 10, 2014

DOS: Trick to change system date fast

Due to the testing of my scheduler system, I have to continuously switch between different dates on my system. It is really not efficient to have to go to the "Date and Time Setting" every time I need to change the date.

I try to explore the window command prompt and realised how easily I could change the date on the Window in less than a sec.

Type below in Command Prompt to change date:
date dd-mm-yyyy

WSUS: WSUS Server not able to reach out to all the cloned client PCs

WSUS Server is a window update server which pushes window security updates/patches to the client PC in the intranet. The client PC in this setup usually does not has access to the internet.

Recently, I encountered an incident where the WSUS Server was not able to reach out to all the cloned PC. The WSUS Server was only able to see the clone PC which last contacted the server. I suspected the cloning could had clone some ID which the WSUS Server used for identification of the client PC.

Articles on the Microsoft website pointed out the ID could be the SusClientId in the client PC's registry. To resolve this issue, I wrote a bat file to reset the SusClientId on all the cloned PC.

Below are my script for the fix:
net stop wuauserv
REG DELETE "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate" /v SusClientId /f
net start wuauserv
wuauclt /resetauthorization /detectnow