Blog

Find your’s windows bit system

How to find out your windows operating system bit – count (system)

To get your windows version open command prompt and execute following command.

Press WIN + r

Run bash is open : enter cmd

OR

Open cmd from your windows

In your cmd window  enter 

wmic os get osarchitecture


C:\Users\YOUR_USER_NAME>wmic os get osarchitecture
OSArchitecture
32-bit

C:\Users\YOUR_USER_NAME>

Here in Result my Operating System is “32 bit OS sytem”

This copy of windows is not genuine

The trail version of windows OS, giving error “This copy of windows is not genuine” is fixed using some simple steps because of expiration of time period of trail or if you are using the pirated version of windows.

You find this error on your screen bottom right hand side corner and blank black screen.

The provided method is work fine with 32bit or x86 version and 64bit Windows 7 OS machine.

Steps to Fix Error Contain 3 -Steps

Step 1 : Uninstall Update KB971033

You are having error that This copy of windows is not genuine when your windows has updated KB971033 file on your system, you have to uninstall that update from your system.

  1. Open Control Panel
  2. Go Program and Features .
  3. Click On View installed updates.
  4. Select form list Update for Microsoft Windows (KB971033).
  5.  Click on Uninstall a program on left hand panel.
  6. Restart your System (PC) .
Step 2 : SLMGR -REARM command
  1. Open your cmd as Administrator.
    • Click On Start , type cmd on search box.
    • Under Program list you find cmd program.
    • Press or Hit Crtl + Shift + Enter.
    • This will open cmd having path C:\Windows\System32>
  2. Type
    C:\Windows\System32>SLMGR -REARM

    (Its is a tool that reset license status of a machine) and press Enter.

  3. Just Restart your System(PC). Now you will receive error message. If the command is not work for you, you need to try with C:\windows\System32>SLMGR /REARM.
Step 3 : Turn Off Updates
  1. Go to Control Panel.
  2. Click Windows Update.
  3. Click Install updates automatically (Recommended).
  4. You must select Never Check for Updates (Not Recommended).

*Please Use Original Window Buy a Simple pack and Prevent your self form Inconvenience.

Gmail smtp.gmail.com:465 PKIX error

Error :

javax.mail.MessagingException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target;
  nested exception is:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
Solution :
For Windows :

Connect to smtp.gmail.com:465 to display the certificate in a terminal window:

  • For Linux:
    openssl s_client -connect smtp.gmail.com:465
    
  • For Mac OS:
    openssl s_client -connect smtp.gmail.com:465
    
  • For Windows
    • Install openssl first
    • Run command:
      s_client -connect smtp.gmail.com:465
  1. Copy and save the lines between “—–BEGIN CERTIFICATE—–” and “—–END CERTIFICATE—–” into a file, say, gmail.cert:
    -----BEGIN CERTIFICATE-----
    MIIDWzCCAsSgAwIBAgIKFeQVggADAAA7NjANBgkqhkiG9w0BAQUFADBGMQswCQYD
    VQQGEwJVUzETMBEGA1UEChMKR29vZ2xlIEluYzEiMCAGA1UEAxMZR29vZ2xlIElu
    dGVybmV0IEF1dGhvcml0eTAeFw0xMTExMTgwMTU3MTdaFw0xMjExMTgwMjA3MTda
    MGgxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1N
    b3VudGFpbiBWaWV3MRMwEQYDVQQKEwpHb29nbGUgSW5jMRcwFQYDVQQDEw5zbXRw
    LmdtYWlsLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuK+t5ZRq6c3K
    kWPwLuIcPa6DgiBURaQK9akP4OBoXKJ6bqYIQWsS4C3RgnOaGaDENadxHSNZ5Qpl
    Vqg2S54N54SM5OXwOq0NtrqdlbhgigB53TZouiJvnLDxxIexSOn2Gx1qyZF2z8Ii
    MoUhHuStWgW5YoOHje8z6K9xQdYkQp0CAwEAAaOCASwwggEoMB0GA1UdDgQWBBTs
    OL4jbtJ5l8B6/eoEvv30KEiTrjAfBgNVHSMEGDAWgBS/wDDr9UMRPme6npH7/Gra
    42sSJDBbBgNVHR8EVDBSMFCgTqBMhkpodHRwOi8vd3d3LmdzdGF0aWMuY29tL0dv
    b2dsZUludGVybmV0QXV0aG9yaXR5L0dvb2dsZUludGVybmV0QXV0aG9yaXR5LmNy
    bDBmBggrBgEFBQcBAQRaMFgwVgYIKwYBBQUHMAKGSmh0dHA6Ly93d3cuZ3N0YXRp
    Yy5jb20vR29vZ2xlSW50ZXJuZXRBdXRob3JpdHkvR29vZ2xlSW50ZXJuZXRBdXRo
    b3JpdHkuY3J0MCEGCSsGAQQBgjcUAgQUHhIAVwBlAGIAUwBlAHIAdgBlAHIwDQYJ
    KoZIhvcNAQEFBQADgYEAQiMlHuQLRFqR10UsSg5WTNe3vagbdnBLAkdhvAf90B5a
    9beBxJH2/ylTSIGfD2uceAqzcsQe6Ouy4C9r3rz86qA1dhdtIcPg6uoZb+E2qhE5
    UaOJOPO4rHInX9kscBxh+baHbpBMh+ch6v5L8plss8hd0id8C4g10YKzwcgPYlQ=
    -----END CERTIFICATE-----
    
  2. Import the certificate into java keystore(Default location):
    sudo keytool -import -alias smtp.gmail.com -keystore /path/to/keystore -file /Users/wilson/gmail.cert
    
    • For Windows:
      keytool -import -alias smtp.gmail.com -keystore "%JAVA_HOME%/jre/lib/security/cacerts" -file C:\Users\wilson\gmail.cert
      
    • For Mac OS:
      sudo keytool -import -alias smtp.gmail.com -keystore /System/Library/Frameworks/JavaVM.framework//Versions/CurrentJDK/Home/lib/security/cacerts -file /Users/wilson/gmail.cert
      
    • For Linux:
      sudo keytool -import -alias smtp.gmail.com -keystore $JAVA_HOME/jre/lib/security/cacerts -file /Users/wilson/gmail.cert
      
    • Note: your need to provide the password to access the keystore. The password for the default java keystore is changeit
  3. Answer Yes when it ask “Trust this certificate? [no]:  yes
  4. Note: if your java mail client application uses its own keystore, you need to change the location of the application’s keystore rather than JVM’s keystore in the keytool command.

For Error :

keytool error: java.io.FileNotFoundException: C:\Program files\...\cacerts <Access Denied>
Solution :
This could happen if you are not running the command prompt in administrator mode. If you are using windows7, you can go to run, type cmd and hit Ctrl+Shift+enter. This will open the command prompt in administrator mode. If not, you can also go to start -> all programs -> accessories -> right click command prompt and say run as administrator.

Error Importing SSL certificate : Not an X.509 Certificate

sudo keytool -import -alias smtp.gmail.com -keystore /path/to/keystore -file /Users/wilson/gmail.cert

I get the error:


keytool error: java.lang.Exception: Input not an X.509 certificate
java.lang.Exception: Input not an X.509 certificate
        at sun.security.tools.KeyTool.addTrustedCert(KeyTool.java:1913)
        at sun.security.tools.KeyTool.doCommands(KeyTool.java:818)
        at sun.security.tools.KeyTool.run(KeyTool.java:172)
        at sun.security.tools.KeyTool.main(KeyTool.java:166)

Solution

your certificate “.cert” or “.pem” file must have a look at it, it should start with

-----BEGIN CERTIFICATE-----

and end with

-----END CERTIFICATE----- 

Finally, to check it is not corrupted, get hold of openssl and print its details using

 openssl x509 -in cacerts.pem -text 

Login to amazon aws ec2 instance using ubuntu terminal

To Connect with your ec2 instance from your terminal , you need

  1. ssh installed on your machine
  2. pem (private key of ec2 instance) for secure login purpose.
  3. internet connection.

1 Install ssh to your local machine if previously not installed

sudo apt-get install openssh-server 

2 In a command line shell, change directories to the location of the private key file that you created when you launched the instance.

3 Use the chmod command to make sure your private key file isn’t publicly viewable. For example, if the name of your private key file is my-key-pair.pem, use the following command:

chmod 400 /path/my-key-pair.pem 4 Use the ssh command to connect to the instance. You'll specify the private key (.pem) file anduser_name@public_dns_name. For Amazon Linux, the user name is ec2-user. For RHEL5, the user name is either root or ec2-user. For Ubuntu, the user name is ubuntu. For Fedora, the user name is either fedora orec2-user. For SUSE Linux, the user name is either root or ec2-user. Otherwise, if ec2-user and root don't work, check with your AMI provider. ssh -i /path/my-key-pair.pem ec2-user@ec2-198-51-100-1.compute-1.amazonaws.com
  1. (Optional) Verify that the fingerprint in the security alert matches the fingerprint that you obtained in step 1. If these fingerprints don’t match, someone might be attempting a “man-in-the-middle” attack. If they match, continue to the next step.
  2. Enter yes.You’ll see a response like the following.
    Warning: Permanently added 'ec2-198-51-100-1.compute-1.amazonaws.com' (RSA) 
    to the list of known hosts.