Changing the keystore and private key passwords with Java keytool

to change the keystore password:

keytool -storepasswd -keystore MYKEYSTORE

to change the key’s password:

keytool -keypasswd  -alias ALIAS -keystore MYKEYSTORE

Permanent link to this article:

Change alias in keystore using the Java keytool


keytool -changealias -keystore KEYSTORE.jks -alias CURRENTALIAS -destalias NEWALIAS

Permanent link to this article:

Uninstall a windows service when there is no executable for it on the system anymore

scenario: How do I uninstall a Windows Service when the normal uninstall script or executable is no longer on the machine?

try: get the name from the Services list then use it in the uninstall using sc.exe

sc.exe delete "This damn service I am trying to uninstall"

Permanent link to this article:

WordPress Media Upload Failing

if you’re trying to upload media to wordpress and it fails to respond OR it fails with a simple error message like “Import failed,” it may be due to PHP configuration limits. they may be set too low to complete the process.

You should contact your web host and ask them to increase those limits to something like these:

max_execution_time 3600
max_input_time 3600
memory_limit 256M
post_max_size 64M
upload_max_filesize 64M
max_input_vars 3000

you’ll also want try updating php to php 5.5 if you have control over that.

some web hosts allow you to override the php configuration just for your specific site (i.e. so you don’t have to ask them as those settings are normally set globally meaning if they change it, it will affect all of the sites they host on the box). for example, here are the ways you can customize your config for php on bluehost and godaddy:


you can verify your PHP configuration limits by installing a “php info” type of plugin like this one
BUT I THINK that the plugin above may just display the core php configurations that your hoster has set rather than overridden ones, so just keep that in mind.

And you can also check your PHP error logs to see the exact error being returned.

Permanent link to this article:

Weblogic Node Manager using Demo cert gives error: certificate_unknown

Users who are using either WebLogic Server 10.3.6 or WebLogic Server 12.1.1 on JDK 1.6.0_101+, JDK 1.7.0_40+, or JRockit R28.3.7+, have demo certificates and are using SSL will get an exception: HTTP transport error: Received fatal alert: certificate_unknown

There are four possible solutions:

  1. Create a new Demo Key with the larger key size
  2. Obtain your own certificate, by submiting a new request to your CA, increasing its certificate strength (i.e. >1024)
  3. Remove the key length restriction (not recommended but the fastest solution)
    The file is located in your client machine’s Java/JRE installed directory $JAVA_HOME/jre/lib/security/

    In Java 1.7.0_40 the by default has this setting: file Snippet

    # Note: This property is currently used by Oracle's PKIX implementation. It
    # is not guaranteed to be examined and used by other implementations.
    # Example:
    #   jdk.certpath.disabledAlgorithms=MD2, DSA, RSA keySize < 2048
    jdk.certpath.disabledAlgorithms=MD2, RSA keySize < 1024

    Changing the 1024 to 512 will allow the existing certificate to work.

  4. Upgrade to WLS 12.1.2

Permanent link to this article:

How to create sym links in Windows


Command line: mklink

The following example creates a symbolic link named MyDocs in C:\Temp to the C:\Temp\Documents:

mklink /d C:\Temp\MyDocs C:\Temp\Documents


Permanent link to this article:

Siebel: Unable to connect to the gateway server SBL-GEN-05009


Trying to install Siebel 8.2.2 on Linux 6 (64 bit) eh?

Scenario 1: Running the Configuration Wizard and it fails with error 5009… something like:

Jan 01, 2015 10:00:00 AM oracle.siebel.configurator.utility.ConfigUtility runProgram
Exited with error 5009


Scenario 2: AFTER running the configuration wizard and trying to configure a gateway name server you get “Unable to connect to Siebel Gateway Name Server”…

NameServerLayerLog Error 1 000000024f4c19ce:0 20120228
10:30:00 Unable to connect to the gateway server.
GenericLog GenericError 1 000000024f4c19ce:0 20120228
10:30:00 NSC ErrCode 5009 SysErr 0GenericLog GenericError 1 000000024f4c19ce:0 20120228
10:30:00 (srvredit2.cpp (302) err=5009 sys=1) SBLGEN05009:
Unable to connect to the gateway server.

Things to check:

  • Typically /etc/host.conf has ‘multi on’ option set. Try overriding this variable in your session prior to running the config wizard
    export RESOLV_MULTI=off

    Note: make sure to use port # lower than 32767

  • Remove any of the existing following files from gtwysrvr/sys
  • And this time (if you didn’t do this the first time), run the config with the “-verbose” option so you can see more wonderful errors if they come up

Permanent link to this article:

X11 forwarding request failed on channel 0

the dreaded X11 forwarding request failed on channel 0 so you’ve tried: ssh and getting the following error on screen when trying to run something that requires x11 forwarding (like xclock or some type of installer perhaps?):

xclock X11 forwarding request failed on channel 0

try this:

  1. login to your server (as root or some type of super user):
  2. install xauth
    yum install xauth
  3. edit /etc/ssh/sshd_config file
    vi /etc/ssh/sshd_config

    set the following two options:

    X11Forwarding yes X11UseLocalhost no

    save and close the file

  4. logout and login again as your desired user ssh

Permanent link to this article:

change the default port that OpenSSH server uses

OpenSSH by default listens to port 22 of all local addresses. To provide additional
security to the OpenSSH server, the ListenAdress and Port
directives in /etc/ssh/sshd_config file can be used.

ListenAddress – List the ip address or hosts that sshd will listen on.

Port – Specifies the port that sshd will listen to.

Example /etc/ssh/sshd_config file:

Port 40

Restart sshd daemon in the OpenSSH server for the changes to take effect.

# service sshd restart

Now the command below can be used to connect a client from serverip network to the OpenSSH server:

# ssh serverip -p 40

Permanent link to this article:

vi commands for cygwin

i started running cygwin for sshd on a windows VM and tried to edit a file using vi and got super frustrated. why is it not the same as regular unix vi??!!! why why??!

anyway, to save you the same headache here is a list of basic vi commands for cygwin

  • i                      – insert is similar to �a� but is to the left of where the cursor is.
  • a                      – appends to the data, after typing �a� you can use the keyboard to type in letter/numbers like a normal word processing program.  When you are done typing what you want at that location, you need to hit the �Esc� button before you can return to the regular mode.
  • Esc                 – escape ends the current mode you are in (i.e. typing mode) and takes you back to the original.
  • x                      – Typing �x� lowercase will erase the character on the cursor, like the �Backspace� key does in a normal word processing program.  The �Delete� button will do the same thing in the regular mode.
  • :w                   – saves all the changes you made to a existing file name.
  • :w new-filename           – saves all the changes you made to a new filename you specify.
  • ZZ                   – Capital ZZ.  This will save and quit the �vi� program and bring you back to the command line.
  • :q!                 – This will quite the �vi� program without saving the last changes you made.
  • u                      – This is undo, and will undo the last action you have completed.
  • dd                   – This will erase the entire line.  Tying a number before typing �dd� will remove the number of lines chosen.
  • :se nu         – This is to �set number lines� which will temporarily number the lines of the document for you.
  • Ctrl f         – This will page down the document by one screen length.
  • Ctrl b         – This will page up the document by one screen length.
  • G                      – This will move the cursor to the end (bottom) of the document
  • 1G                   – This will move the cursor to the top of the document



Permanent link to this article:

Older posts «