Friday, March 21, 2008

Wednesday, March 19, 2008

China says Dalai Lama is a wolf..


A senior Chinese communist party leader remarked that Dalai Lama is a wolf in monk's robes. So how many people has Dalai killed? Was it Dalai who was driving this Tank? Free Tibet or not, do not curse Dalai Lama. If peace could take a human form then he is one.

Obama losing over Preacher's utterances

According to a new poll, Obama lost his 14pt edge over Hillary over Wright's sermons and now both the democrats are behind McCain. McCain is a nice guy so I am not worried. But I would like to refer to an old adage. Ostriches are known to hide their heads under the sand thinking there is no sand storm. Recognizing a problem is a start of solving it. If race was not an issue in America then even comic shows would not be filled with "white boy" jokes. On the streets it is still an issue. And someone who took high roads to address and recognize it should be further strengthened and supported. Strong buildings are not built on top of quick sand. This issue is as controversial as the policy of reservations in India. Every one recognizes it but not in open. There is a resentment, there is a requirement and there is a need to bring it in open and discuss it. Neither Indian political circles have any guts to do so nor, seems America has to address its own. Vis-a-vis Obama if he loses to Hillary he will be the first unified black representative in the country after MLK which neither Jesse nor Rev. Sharpton were able to do. If he loses to McCain then he has already succeeded in bringing the issue of race to the fore. And if he wins, it will be a big moment in the history of this country.

Saturday, March 15, 2008

Employment discrimination in India

I agree I am not the best person to comment on India. I am a Trishanku. The government of this country has not fully accepted me and people of the other think I am not Indian enough. But I do have an acute observation of the problems India faces. For one the two parallel economies that we see today. First is the computer economy where an entry level job could offer a salary of something in between $350-$500 per-month. Its not too much of a hassle to get these jobs. Demand is more and there is a beginning to have a shortage of people. As long as you are slightest trainable, you are in. On the other hand, in non-computer economy things are very different. Lets take Civil services that tops the chart on the other side. On an average a graduate spends 1-2 years on preparation, goes through four level of examinations ranging from prelims, written, interview and medical. For 200 jobs in a year, you get around 300-400,000 applicants. Happens to be one of the toughest examination that Indian states conduct and with salary? 200-250$ per-month. This is a discrimination. Its important to keep the difference to minimum. After all we have seen invincible companies getting down and out for creating economic wedge between its employees. Easier and higher vs. lower and tougher can bring the entire society crumbling down. Indian government should be wary of that.

Tuesday, March 11, 2008

Using Netscape LDAP APIs with Active Directory

One issue that I encountered with MS Active directory is that typically the DN is set to something like: CN=Srivastava, Ashish, OU=MyDepartment, DC=mydomain, DC=com. The authenticate () method of LDAPConnection needs to have the DN and the user password. Problem is if you need to authenticate a user with his/her NT login name/password, the above DN can not be used. In AD, the login name is stored in sAMAccountName and not in CN. The trick is to use NT login name to search the user in LDAP and then find his DN to authenticate with his password. Following is a sample method to authenticate a user with his NT-login name and password. You would need one user account that has lookup permissions.


public boolean authenticateUser(String uid, String password) {
LDAPConnection ld = null;
boolean isUserValid = false;

try {
// -- Assuming a Pool of LDAPConnections are maintained.
ld = cPool.getConnection();
LDAPSearchResults results;
// -- Search for the user with the samAccountName and then find it's DN to authenticate
results = ld.search(BASE_DN, LDAPConnection.SCOPE_SUB, "(&(samAccountName=" +
uid + "))", new String[] { }, false);
if (results.hasMoreElements()) {
LDAPEntry entry = results.next();
String dn = entry.getDN();
System.out.println ("DN: " + dn);
ld.authenticate(dn, password);
isUserValid = true;
}
} catch (LDAPException e) {
// -- isUserValid = false;
e.printStackTrace();
} finally {
cPool.close(ld);
}
return isUserValid;
}

Wednesday, March 05, 2008

Doesn't she deserve a better life?

Do not reject a community in participating in the economic growth of the nation. Do not create a Class system. If their own leaders have looted them for years, its the responsibility of the entire nation to step forward and hold their hands. Punish those who needed to be punished not the victims.

Saturday, March 01, 2008

You are what you are if you...

1. Send fax with a postage stamp.
2. Try to drown a fish in water.
3. Trip over a cordless phone.
4. Put lipstick on your forehead to make up your mind.
5. Study for blood test and fail.
6. Miss bus number 44 and take #22 twice.
7. Get stabbed in a shoot out.
8. Sell your car for gas money.
9. Drive to airport and turn around to go home after seeing "Airport left" sign.