Recent Notes
Displaying keyword search results 1 - 11
Created by Dr. Xi on February 25, 2012 09:25:23
Last update: February 25, 2012 09:25:23
By default, Java uses $JAVA_HOME/jre/lib/security/cacerts to very an SSL certificate. You can add a certificate to this file:
$ keytool -importcert -alias VeriSignClass3Interna...
The default password for cacerts is: "changeit".
Created by Dr. Xi on February 06, 2012 12:14:11
Last update: February 07, 2012 15:39:35
Oracle sqlplus command line tools does not support command line editing out-of-the-box. But on Linux there's a handy utility that enables command line editing with any command line tool: rlwrap - readline wrapper.
Install rlwrap:
$ sudo apt-get install rlwrap
Create a keywords file .sql.dict (optional, but convenient):
false null true
access add as asc begin by chec...
It would be nice to add the tables names also.
Create an alias for sqlplus (put it in .bashrc ):
alias sqlplus='rlwrap -f $HOME/.sql.dict sqlplus'
Created by Dr. Xi on February 12, 2010 22:52:27
Last update: November 08, 2011 19:48:09
For Tomcat 6, there's no default manager username and password. You do have to set it up yourself, though it's pretty straightforward. The Tomcat manager webapp is restricted to users with a role named manager . So you'll need to create a user and assign the manager role to it.
Edit $CATALINA_BASE/conf/tomcat-users.xml to read:
<?xml version='1.0' encoding='utf-8'?>
<!--
...
For tomcat 7:
<tomcat-users>
<role rolename="manager"/>
...
Created by magnum on September 23, 2011 16:06:02
Last update: September 28, 2011 09:29:53
This procedure works for xl2tpd .
Edit L2TP configuration file /etc/xl2tpd/xl2tpd.conf :
; Sample l2tpd.conf
;
[global]
; listen...
Edit PPP options file for L2TP /etc/ppp/options.xl2tpd :
ipcp-accept-local
ipcp-accept-remote
ms-dns ...
Edit PPP authentication file /etc/ppp/chap-secrets :
# Secrets for authentication using CHAP
# serve...
Start the server:
# /etc/init.d/xl2tpd start
Monitor the log:
# less /var/log/messages
Created by freyo on April 20, 2011 12:50:09
Last update: April 20, 2011 12:50:09
To sign an Android APK from command line:
Sign the APK with jarsigner (using default keystore, android-root is the alias of the signing key):
$ jarsigner -signedjar HelloWorld-new.apk HelloWor...
Verify signature (optional)
$ jarsigner -verify -verbose -certs HelloWorld-new...
Align the APK (must use -v 4 option):
$ ~/android-sdk-linux_86/tools/zipalign -v 4 Hello...
Created by Dr. Xi on April 01, 2011 12:59:10
Last update: April 04, 2011 14:14:17
To configure Tomcat HTTP Basic Authentication with SSL:
Configure web app for basic authentication (add these in web.xml ):
<security-constraint>
<web-resource-collec...
Three elements are needed for this to work: security-constraint with the url-pattern to protect, login-config for the type of authentication method to use, and security-role for the role name(s) used in the security-constraint .
Add login info to conf/tomcat-users.xml :
<tomcat-users>
<role rolename="testUserRole...
Turn on SSL in conf/server.xml :
<Connector port="8443" protocol="HTTP/1.1" SSLEnab...
For default keystore file ${user.home}/.keystore , the keystoreFile attribute can be omitted. Otherwise, add keystoreFile="/path/to/keystore/file" .
The setup is different if you are using APR .
Created by nogeek on June 18, 2010 21:14:34
Last update: June 18, 2010 21:14:34
For the default profile, the admin password is stored in the file server/default/conf/props/jmx-console-users.properties . Simply change the password and save:
# A sample users.properties file for use with the ...
But most likely you are trying to secure the JBOSS server in a production environment, and changing the password only isn't enough. For example, the JMX console is still wide open after you made the above change. Securing the JMX Console and Web Console is quite a daunting task!
Created by Dr. Xi on January 07, 2010 23:40:28
Last update: February 09, 2010 03:24:35
This is a utility to generate SQL insert statements for Oracle for one table, or a set of tables. It doesn't cover all possibilities but should be good enough for most cases.
import java.io.*;
import java.sql.*;
import ...
To generate insert statements for multiple tables, simply put the table names in a file, one per line, and use the -f switch.
Created by Dr. Xi on July 28, 2009 19:00:55
Last update: July 28, 2009 19:03:57
When you install Apache with mod_ssl, an executable file openssl (or openssl.exe for Windows) is installed in /usr/local/ssl/bin (or %APACHE_HOME%/bin ). This utility is used to generate private key and certificate request:
Generate private key:
openssl genrsa -out server.key 1024
# or wi...
Generate certificate request:
openssl req -new -key server.key -out server.csr
...
Self-Sign Certificate:
openssl x509 -req -days 3650 -in server.csr -signk...
Apache configuration:
Listen 443
<VirtualHost *:443>
ServerNam...
In some configurations
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unc...
is used to work around MSIE bugs. See http://httpd.apache.org/docs/2.2/ssl/ssl_faq.html#msie for details.
Created by Dr. Xi on October 15, 2008 19:49:31
Last update: October 15, 2008 19:49:31
Ant script:
<?xml version="1.0"?>
<project name="OC4JDe...
Deployment properties:
# Deployment properties
targetenv=Development
...
Created by Dr. Xi on October 08, 2008 19:33:21
Last update: October 08, 2008 20:17:42
In sqlnet.ora , there's a parameter named NAMES.DEFAULT_DOMAIN that usually contains the value world . If you remove this parameter then you don't need to append .world . My sqlnet.ora contains three lines:
# sqlnet.ora Network Configuration File: C:\wo...
To force a lookup without NAMES.DEFAULT_DOMAIN appended, append a dot to the tnsname:
tnsping unqualified_tnsname_name.