Posts

Showing posts from December, 2015

Handy Certificate Commands for Linux

How to view certificates in Java Key Store (JKS) keytool -list -v -keystore <keystorename>.jks How to add certificate in key store (it will install the cert chain of trust also)                 keytool -importkeystore -srckeystore /tmp/<pfxname>.pfx -srcstoretype pkcs 2 -destkeystore <keystorename>..jks -deststoretype JKS                 keytool –import –keystore <keystorename> -file <certname>.cer In the above, the pfx should contain the certs til the root level. After entering the command you need to provide destination password as key store password and source password as pfx password. Note: the pfx password and keystore password has to be same.   How to delete certificate in key store.                 keytool -delete -alias <aliasnameofcert> -keystore <keystorename>.jks Change alias of the existing certificate: keytool -changealias -alias <aliasname> -destalias <newalias> -keystore <keystorename>.jks Always t

list of software installed in a machine

The list of software installed in a machine is easier to find if you have a single system. In case of several servers for any project / application, i needs a automatic tool to generate the report. It can be embedded into your daily dashboard or monthly health check reports. We can achieve this through two ways. One through VB script and another through PsTools executable. Vb Script for finding installed software in the machine. We can edit the contents to make the output in required format for the consumption. Option Explicit    Const HKLM = &H80000002 'HKEY_LOCAL_MACHINE    Dim strComputer, strKey, CurrentDirectory, Filepath   strComputer =  "."     strKey =  "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\"     'Get script current folder   CurrentDirectory = left(WScript.ScriptFullName,(Len(WScript.ScriptFullName))-(len(WScript.ScriptName)))   'set result file path    Filepath = CurrentDirectory &  "\Instal