Thursday, January 24, 2013

Failed to configure LDAP on Fedora 17

A been following this tutorial to configure LDAP on my Fedora 17 for quite some time, anyhow I am not able to complete this tutorial as the targeted Fedora version in this tutorial is quite far behind (only last minute I aware of this). A lot have been change.
OpenLDAP How To (Fedora) This tutorial explains how you can set up centralised LDAP authentication for a network, covering both the setting up of the LDAP server and client. Whilst based on Fedora 13, it may also apply to other versions.

Debugging SSH shows success!!

This tutorial shows that I have successfully configure SSH. As I see the following output after this command ssh -vT git@github.com.
Error: Permission denied (publickey) This terribly nondescript error simply means that the server rejected your connection. There are a number of reasons this can happen, this guide will cover the most common causes.

Here is the output:
...
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: Connection established.
debug1: identity file /home/huahsin68/.ssh/id_rsa type 1
...
...
Hi huahsin68! You've successfully authenticated, but GitHub does not provide shell access.
...

Is the Github SSH tutorial correctly done?

According to this tutorial, I am sure I have successfully configure SSH. But why am I do still getting this error Permission Denied (publickey) when connecting to gerrit.LibreOffice.org? Can I use the same account ID for both Github.com in Gerrit?
Generating SSH Key If you have decided not to use the recommended HTTPS method, we can use SSH keys to establish a secure connection between your computer and GitHub. The steps below will walk you through generating an SSH key and then adding the public key to your GitHub account.

LibreOffice Gerrit configuration failed!

Spending my whole day setting up the Gerrit end up nothing is being done. When I issue the command ssh logerrit, I got this Permission denied (publickey). Whats went wrong?!!
Setting Yourself Up for Gerrit
  • login at https://gerrit.libreoffice.org/ (requires OpenID -- which you get for free with your google, yahoo, blogger, launchpad, flickr, wordpress, myspace account)
  • you must set your user name so: use your Freenode IRC nick as your Username in the "Profile". Users are associated by username -and- ssh key. This username is referenced as YOUR_USERNAME_HERE below.

Sunday, January 20, 2013

Configuring LDAP authentication into SVN on AIX

On last week, I have successfully configure Windows Active Directory authentication in our's new SVN server for the whole group of people. I'm feeling so great that I manage to configure this on a UNIX machine, AIX 7.1. Two components required on this setup, subversion, and Apache server. To ensure the correct version has to be install for AIX, I download all dependencies from this site. The installation was handle by rpm, every dependencies are install into /opt/freeware directory, basically not much worry on this, just use the default installation settings.

To configure the Subversion to have HTTP access will require Apache server to do this job for me. Once the Apache server has been installed, additional configuration need to be done on this file, httpd-subversion.conf located at /opt/freeware/etc/httpd/conf/extra. The same file can be used for Active Directory/LDAP authentication configuration, it is just right inside the same < Location > section. 
   
       DAV svn
       SVNParentPath /u01/svn
       SVNListParentPath off
       AuthType Basic
       AuthName "Huahsin Source Code Repository"
       AuthBasicProvider file ldap
       AuthBasicAuthoritative off
       AuthUserFile /opt/freeware/etc/httpd/conf/svn_auth_file
       AuthzLDAPAuthoritative off
       AuthLDAPURL "ldap://128.230.84.53:389/dc=Intralab,dc=java?sAMAccountName?sub"
       AuthLDAPBindDN "CN=TestUser,OU=javagroup,DC=intralab,DC=java"
       AuthLDAPBindPassword Test123
       require valid-user
   
Assuming I'm connecting to an Active Directory server having this IP and port, 128.230.84.53:389, and the JAVA developer locate in the domain java.intranet will be granted access into the SVN. Thus the configuration will look like this.
Extra note on AuthLDAPBindDN and AuthLDAPBindPassword, this is the user account that dedicate for the SVN to get pass into Active Directory server authentication, without this the rest of the authentication will not get pass. AuthBasicProvider file ldap giving an option that first will look for the authentication inside /opt/freeware/etc/httpd/conf/svn_auth_file, if the user wasn't there, look into the Active Directory/LDAP server.

Sunday, January 13, 2013

invalid LOC header

I found a new error code while running my app using maven build, see this:
Failed to parse plugin descriptor for \
org.apache.maven.plugins:maven-war-plugin:2.1.1 \
(/home/huahsin68/.m2/repository/org/apache/maven/plugins/maven-war-plugin/2.1.1/maven-war-plugin-2.1.1.jar): \
invalid LOC header (bad signature)
What happen?!! A post from stackoverflow.com has safe me on this problem. Simply remove m2 folder and download again the whole jars. How?!! Usually I'll use this mvn command to do the download but this round when I upgrade my Fedora box, all tools are gone!! sigh~ Luckily eclipse solve this problem for me, remember I have this maven Goal set: clean install tomcat:run-war? This will do the download during the build. Cheers~

Disable info log in WebSphere

Now I realize there is one problem with log4j. I have an info level log in my application, but when I set it to error level, the log still print out in SystemOut.log in WebSphere. Asking around the experts and they told me that there is work around on.

In WebSphere console, go to Logging and tracing > server1 > Diagnostic trace service > Change log detail levels > runtime tab. There is existing log in that look like this:

*=info: ConnLeakLogic=finest

this is the info log which belong to WebSphere, if it were disabled, SystemOut.log will be very clean. This is how I disable my info log configuration by append it to the existing one like this:

*=info: ConnLeakLogic=finest : org.huahsin.*=off

So whatever shit and rubbish belonging to org.huahsin package will be filter out.