Tuesday, March 18, 2008

ADWebMin work started again

I have started writing AdWebMin again, there are a LOT of people who are looking for tool like this. It will feature following "features"

  • Based on ASP.NET MVC Framework
  • Password reset - AD Account  self service
  • AD Account Management
  • REST Api
  • OpenSource

I hope to publish it by end of next month, So wait for 4 weeks if you waited this long.

Ajey

Sunday, March 16, 2008

Mac, VMWare Fusion and 2Wire Routers - network connection drops frequently

I have been puzzled by unstable connection with my new Mac Book. Earlier one did not have problem but new one had lots of problem - I had my AirPort (Wi-Fi/Wireless) connection dropping every 5 minutes. I suspected VMWare fusion because I was getting messages in system logs where VMNet interfaces were having some problems. I went through vmware forums and figured out that it might be a problem with VMWare. After being 100% sure that its vmware, I just uninstalled vmware. Now I did not have any VMNet interfaces but my machine was still dropping connection with my DSL wireless router (in my case its 2Wire). 

After going through logs and everything else..  I came across this (Apple forum) link. And then I changed channel, frequency, encryption and what not.. but no luck. The only solution which is also given in this thread is.. keep pinging the router from terminal and link never drops!

I can not belive... but the solution is - Keep pinging gateway continuously.

Tuesday, May 29, 2007

Kuchh Baat Hai Ke Hasti Mit’ti Nahin Hamari

Yunan-o-Misr-o-Roma Sab Mit Gaye Jahan Se
Ab Tak Magar Hai Baki Naam-o-Nishan Hamara
Kuchh Baat Hai Ke Hasti Mit’ti Nahin Hamari
Sadiyon Raha Hai Dushman Daur-e-Zaman Hamara.
- Allama Iqbal

Saluting 150 years of First Great Indian Revolution in May 1857. I went through so many articles and so manythings.

Actually I feel that British did a good things to us - they united us, they made us stand like one country, till 1857 it was struggle to get free from them but individually, finally we made it after 90 years in 1947.

I salute all the martyrs. What all pain they have gone through to get the freedom and what all things they did! the sacrifice. If they would have not done that we would have not been here and taking breath in Free India.

BBCHindi has very good coverage on the whole subject.

Same goes with out existing Army! they are there thats why we are good. And what do we for country? we do not do any good for country.. I wasted my 30 years and so did others, we encourage corruption because we end up paying less, we encourage bribe because we want our work to get done illegaly and fast, we do not want to stand in queues and pay more money for that.. what will happen to those who can not pay? we are cheating them! we are cheating everyone! STOP, even if we try to fight it, its big thing now.. I really do not know what to do and what should we do?

Read this if you can -> Ae Mere Watan Ke Logon

Sunday, May 27, 2007

Backups with LVM

Some time back I came across this link -> apps that make linux users powerful! « Jag! and came to know about many applications which exists for Linux but we do not know about them.

Why do we not know about them, its just only one reason, because we do not pay enough attention. But some one is doing it.

Recently we came across a problem that we had to take backup of Linux Open files. Our current solution could not take backup just because we purchase stupid software without thinking about it. I was not INVOLVED in that decision, but some how now I have manage that.

Next upgrade of backup software, which can take open files backup was $90K away. And I was NO way interested in purchasing that. We came up with an idea of using Linux snapshots, but since our systems were RHEL 3.0 Kernel 2.4, Linux snap shot was not an easy go. We came up with an error of not able to allocate memory while creating snapshot logical volume.

So error was lvcreate -- ERROR "Cannot allocate memory" creating VGDA and any time I search for something on Google I am point to this mail thread with no answers from any one. All forums would point to it and some suggested to upgrade to LVM2 with Kernel 2.6, which was not the answer I was looking for. I had to fix this some how!

I got hold of some patches, started looking through code, patching and booting kernel did not get me any where! the error was causing because of himem allocation error or something like that. While going through plain C code for like 9 hours, I found the solution but on the same time I realized that I can pass it to kernel as mem boot option. But I changed the code compiled the kernel, increased the default memory! And voila it worked, but this was not manageable, because everytime kernel sources gets updated I need to recompile the kernel, I tried to pass this as boot option (mem=4000m) and it worked again.

So to fix this error, most probably you need to add this boot option in grub.conf and you are most probably sorted. (fingers crossed)

So after that it was just so smooth to do backups with LVM Snapshot!

I really do not know, why people are still afraid of using Linux?

Saturday, May 12, 2007

Open Solaris, FreeBSD and Ubuntu

I have been thinking about these three Operating systems, I know very good committers from these three communities who can go in-depth about praising their operating system.

So I am writing something similar to network sniffer. When I talked to three gurus seperately they told me how to take advantage of their system and not the other ones. Now I am totally confused with what to use.

I do not have patience or time to checkout which network stack is more mature.. I think I will just start with Linux, apparently Linux has bigger community with network stack but immature network stack. Really do not know what to do..

Updates in few more days! I need to choose one of these three.. btw I was almost chose RTLinux or Ubuntu.

Monday, April 30, 2007

Ubuntu.... more tweaks

So... after I installed ubuntu, I had only two issues - I did not like anti-aliasing, and it was not rendering text properly for hindi website.

Basically, I was kind of pissed, but it was okay, because I was still able to do many more things compared to what I was able to do in Windows. I finally fixed Hindi rendering issue by installing complex language support and tweaked anti-aliasing settings, inside font dialogue.

Btw - Bit stream fonts are better rendered compared to default sans font and if you change anti-aliasing settings (goto fonts -> details) then you get better results compared to earlier results. Now things are much better.

So one more thing ubuntu should do is to ask - do you have LCD/TFT/CRT monitor and should adjust anti-aliasing by default.

more comfortable reading...

Friday, April 27, 2007

Finally ubuntu

1 year back, I moved to FreeBSD. I was not that hardcore programmer/user as I should be. People may argue that FreeBSD is really cool (as I said in that post) and sometimes it was really really cool. But on the other hand most of the time I had to run programs in Linux Compatibility mode, which was okay! but soon I started hitting road where, I had steep learning curve.

Which kind of forced me to get down to one thing.. think! I did not want to go vista way, I wanted windows only for prorgamming C# or Microsoft specific stuff and nothing more than that. We were already doing lots of stuff on platform independent languages, eg - ruby and java.

So basically, either I can use power of *nix without ease or get into useless world of Windows (which still earns me money). I got some what in between with ubuntu.

here are few things which worked out of box. I have dell d620

  • detected everything on my laptop
  • I copied my notes directory to Linux and ran "wine notes.exe" I got one glitch that it could not find the e:\ directory, I mappy notes directory to e:\ using winecfg
  • I connected to my VPN using vpnc instead of Cisco Secure VPN client, some how I could not get feisty fawn and Cisco Secure VPN client live together.
  • Wireless worked out of the box
  • It detects and mounts my USB drive automatically.
  • VirtualBox does virtualization for me.

Till now I am pretty happy with what I have! what all I can think of, I have it enabled.. the only thing - which I am not very sad about is - that my Hindi Font rendering does not work. So I can not read http://bbc.co.uk/hindi website properly! and I miss Dainik Jagran a lot.

Kudos to Ubuntu! Just bit more eyecandy! I do not know what I am missing, but it needs to beautiful also, although this is the most amazing experience of Linux! it just works out of box!

Tuesday, February 13, 2007

JNDI and Active Directory

So, I wrote Active Directory Self Servicing application for my company. My good collegue (Barrow) always insisted that I should write in Java using jLDAP, but I always thought that its good to have MS Technology to access Microsoft Active Directory.

Things went perfectly fine and I enjoyed writing application in ASP.NET 2.0 with C#. But my good collegue still did not want to use it, just because we have to manage one app in .NET and rest all apps in Java. He insisted on porting this App to Java.

I tried to use Novell jLDAP, but that did not work at all for functions like reset password for user and getting multivalue attributes. I might be wrong, but at least I did not find any examples for that.

So finally we came across forums as http://forums.java.sun.com and started looking at JNDI examples. I have completed the rewrite of the app. (It was not port). But I faced lots of issues to write things in plain JSP compared to plain ASP. I must accept that Microsoft Visual Studio.NET + ASP.NET 2.0 is kind of much more advanced compared to plain JSP. But when I look at JSP, and I started wondering that Sun wrote this technology at least 6 years ago and MS is still catching up on that.

Finally today, I have two versions on Same app on is on C# and another is on Java. A good satisfying experience.

Thank you Barrow!

Monday, February 12, 2007

chickens!

If I look back 20 years in my life, I have 5 people.. who some how some day stopped talking to me and never revealed the cause. So what did I do? I talked to few people who were our common friend and tried to figure out what happened actually? But that all went in to vein and It was much of waste of effort. But today.. I am angry with these idiots.. because if they would have told me why they are not talking to me then I would have been very happy and would have stopped thinking about them.

Lets step back.... so while cooking food (I had daal, roti and mango pickle), this combination some how reminded of my best childhood friend - Vivek Dwivedi, Vivek and I use to be together almost 75% of day time. From 1st Standard to 9th Standard, suddenly one day, he stopped talking.. and then he did not talk to me for next 5 years. (that was too much for friendship to go away, it bothered me a lot of those 5 years) I kept continuing going to his place and he will not talk. It was awkward that his parents would call me and I would go there but this guy would not talk to me. Last year I went to my hometown for 2 days, and I was walking with my nephews (Amey and Himanshu) and suddenly I see Vivek walking towards me on Road. I saw him, he waived hand, I was so pissed.. and then he came talked to me. I asked him.. so tell me why are you not talking to me since last 18 years! and he did not have answer. And I told him - that if you can not tell me then please do not bother me after 18 years and I just left him there.

Second person was my collegue at work - We were friends, use to do so many things together - and our company let him go... and he stopped talking to me. I never got to know why did he do that. Some how after thinking about Vivek - I am bit relieved about him too.

Third person - She was very good friend of mine, 12 years ago I met her in Allahabad, we were very good friends. And one day - she calls and tells me that she won't talk to me, and I asked her why, she gave me most confusing answer - ask yourself. If I knew that why she won't talk to me why would I ask her? Then she never talked to me again - But yesterday I got a mail from her after 10 years. And I asked same question, and she said that its too late for the answer. She told me that she will tell me some day, when she will feel okay. (she is still counted as half chicken)

Fourth and Fifth - These are my good friends, I know them since long, they knew me through some friends even before they met me. These two have the similar characteristics, they arey trying to ignore.. which is OKAY! but I would love to hear from them why would they ignore me.

So.. why did I think about it today? Because its stupid chicago weather and I can not go out! and Literally I do not have any work. But anyway.

I think that people think differently, some people are not open and I have strange experiences that people talk some thing bad about some one, and those two are really good friends, I have one of my collegue, who I think was one of the reasons for something bad for other collegue, but it seemed that they both were good friends.

I keep thinking about myself, I have huge feeling that people get irritated with me and they do not tell me! But I really do not know how to deal with this... may be the best idea is to leave everyone on their own and go on your own!

Most probably, I am chicken too because I have not revealed some names, I think I will do that soon.. but at least I am not chicken to tell some one that I do not want to talk to you because of these reasons.

Friday, June 02, 2006

Fixing stuff

How much difficult it is to fix some stuff in life? can you not undo some mistakes. I have come across one of these incidents recently and realized that people can not fix certain things without hurting any one's ego/respect or feelings.

So, I realized that if I made some one do something for my sake, it will certainly won't look good. But if some one is really realizing that mistake has happened then the best way is to understand the mistake. And keep it to yourself. At least its good that some one at least realized the mistake.

But on the other hand - keeping that to your self does not fix the problem. You yourself understand that its okay  to leave the matter as it is. But the way it looks to other you have not done anything about fixing the stuff. So they expect you to fix the stuff and actually its impossible for you to go and talk to everyone on this matter and let them understand that it was mistake and this is why it happened (give each one of them individual explaination!)

So explaining that to everyone is not again a solution.. So what I am wondering is - what is the real solution for this? .... thinking...


Wednesday, February 15, 2006

Webspher Saga

So recently(ummm been two months now), I have been asked to install/configure websphere application server on one of server over here in Bangalore.

Our app is kind of complex, because it talks to many other applications using JMS and dumps data on queues! Rest of it is pretty straight forward.

But - here is what happened

  1. We got Java VM hanging with thread core dump
  2. We got duplicate class error when there was duplicate class
  3. We could talk to MQSeries
  4. We got database problems

Here is what we did - we searched google, it helped alot, but crux of the whole issue is that you can not even think that there can be duplicate class error because of a bug in Websphere - and on top of that, you have to give permissions for queue manager even if you have security turned off.

Basically - we had to patch websphere + java again and again to resolve these issues.

I am frustated!

Tuesday, February 07, 2006

Load - in Linux / Unix

Yesterday I was working on one server. Server was very very slow, and when I looked at Top command I got load average of 0.0, 0.15, 0.27 which was not what I expected. Generally load average should be higher than this. But curiously I looked at man page of Top. But somehow "man page of top" did not give me proper answer to this Load Average number. Surprizingly uptime and w commands also give you same kind of output. So what are these load average numbers? And how kernel or any command computes these number?

I started searching about it and finally came across this article


Which clearly says something like this :

Those three little numbers tucked away innocently in certain UNIX commands are not so trivial after all. The first point is that load in this context refers to run-queue length (i.e., the sum of the number of processes waiting in the run-queue plus the number currently executing). Therefore, the number is absolute (not relative) and thus it can be unbounded; unlike utilization (AKA ``load'' in queueing theory parlence). Moreover, they have to be calculated in the kernel and therefore they must be calculated efficiently. Hence, the use of fixed-point arithmetic and that gives rise to those very strange looking constants in the kernel code.

Tuesday, January 10, 2006

Keep Making Notes

So whats the best way to keep making notes? There is no way you can stick yellow sticky in your brain.

There are few! keep creating files in your home/notes directory and keep putting notes over there or "INSTALL a WIKI in your comp" this is really cool.

So what I did was to install a MediaWiki with LightWeight Tuned Mysql Server on my machine. And now I keep everything in that wiki. Media wiki is good because i can write stupid text with wiki markup and it gives me the properly formatted text.

Its indexed, nice and good!

So now on, I will keep everything I want to make a quick note of in wiki.

its good and usable

-ajey

Monday, January 09, 2006

FreeBSD is really cool

When I talk about Linux - its just three flavours - Gentoo, Redhat (RHEL or Fedora) or Debian. And sometime I think about Ubuntu too. But there is jungle out there. Linux is really something to play around and work on - day in and day out. And there is no dispute about nice things in Linux.

But as I said there is jungle out there - and I like something in this distro and do not like something in that distro. More over - I was getting really really confused and irritated with the kind of foot print (3 disks, 2 gb or some other crap) these distros comes with. Some of them favour sendmail, some of them favour postfix. Some one will tell you how cool it is to work with Gnome and there is something called KDE too.

More over - for each of the linux flavours, these guys have done something crappy, about changing the file location, even renaming the files and what not.

So I thought - why don't I write my specifications, talk to ten people and see what I want? So I talked to few of my friends, and put my requirements. I got few suggestions, Here is what I feel is the best

  1. Corporate Internal Firewall + Router -> Fedora Core + Iptables + ip2
  2. Corporate External Fireall + Router -> OpenBSD + PF
  3. Corporate External VPN, Site to Site -> OpenBSD + PF + ISAKMPD
  4. Network Monitoring Tools -> Any Linux + MRTG + nMap
  5. IDS - NetBSD(because it can run on very old hardware too) + Snort
  6. Personal Computing Novice user -> Ubuntu + KDE or Gnome
  7. Personal Computer more fun -> FreeBSD

And thats the exact reason I chose FreeBSD, Now I would like to tell you why do I like in this OS?

  • Simple package add and delete
  • Simple ports system
  • Well structured layout
  • Well documented apps and functions
  • Ease of use!

/usr/ports rocks, any things you want just locate the port and start using it. Or just do pkg_add !

That was praise! this is not the only unique feature I liked about FreeBSD. but there is tons of information available, in user readable form! So after must hesitation, I booted my system with FreeBSD, the install is simple but too confusing (as it appears first time) but later on if you read things twice, you are all set to go.


So, after setting it up there are only few things which I faced!

I wanted eclipse (ide), firefox with anti aliasing and eye-candy wm.

For eclipse - I had to download JDKs from Sun's site and put that in /usr/ports/distfiles and everything was cool.

Then for FireFox - to get anti aliasing work you need to do something like this

  • update to gtk+ 2.0 or just rung update gnome.sh and it will update all apps
  • type about:config in firefox
  • filter on font keyword
  • then enable antialiasing, choose Bitstream Vera font instead of helvetica and times new roman. Choose Bitstream Vera Mono instead of Courier
  • And use libfreetype.so.9 version instead of 6

Thats all! and you have firefox running with AntiAliasing


Next task was to run Notes 6.5 in FreeBSD with Wine Ver 0.9.5 (In Linux you can use Cross Over Office) but things were too simple over here - I toook 30 minutes to figure out things but rest is as easy as I can be...

  • compile wine "cd /usr/ports/emulators/wine" and then "make install clean"
  • start wine without any parameters, it will do lots of things and will end up showing usage information
  • copy installed notes (you can not install notes in wine) dir and put it inside ~/.wine/drive_c/program files or where ever
  • copy MFC42ENU.DLL mfc42.dll msvcrt.dll netapi.dll
    mfc40.dll mfc42u.dll msvcrt20.dll netapi32.dll
    mfc40u.dll msvcp60.dll msvcrt40.dll usp10.dll from windows\system32 to ~/.wine/drive_c/windows/system
  • start "winecfg"
  • Choose OS Version - Windows XP
  • goto over rides and over ride all the above dlls and change the order to
  • type wine "c:\Program Files\Notes\nlnotes.exe" and your program starts if not then goto .wine/drive_c/program files/notes and then type "wine nlnotes.exe" and it should just work without any problems! it worked for me :-)

Once I got my apps running under WM, the time was to choose eye-candy - for my desktop, and the winner is ENLIGHTENMENT DR17 - you can build it in /usr/ports/x11-wm/enlightenment-devel port.

I compiled and installed enlightenment with Gulivert's Milky theme.

Now the only problem I had was, everything was looking cool, except eclipse and gaim. Both were GTK+ apps and i knew that there has to be some way to apply themes to them outside gnome. Because I was not running gnome and was trying to get same look and feel across apps in enlightenment.

So I used gtk-theme-switch http://freshmeat.net/projects/gtkthemeswitch to do required task. And now everything looks nice.

Now I have my FreeBSD desktop with option to remove and add program with pkg_add/pkg_delete or make install/make deinstall. And i do not have to bother about how to compile and clean this whole mess, instead of getting into Linux and trying to figure out dependencies and many more hell!

And as far as comfort is concerned. Really! Enlightenment is nice WM, and takes less memory than GNOME or KDE.

last thing - I use QEMU instead of VMWare to get my Virtual Machines working.

thanks OpenSource!

Tuesday, December 13, 2005

Active Directory Web Interface for Administration

I have been administering active directory since last 4 years. The most frustating thing I found was to administer it remotely - the only was to remote desktop to one of the domain controllers and do my task.

Later on I realized that Active Directory Administration GUI provided by Microsoft was just enough to get my task done. But this GUI was not smart enough to provide me instant feedback on whats happening in my domain. Such as - last logon time for each user, active computers, groups with member summary and many more things. So I realized that it was not enough for me to do normal administration task. And more over I wanted to do it using Web Browser - so it does not matter whether I am using Linux or Windows, I just pop-up browser and do everything required to do administration.

Microsoft included System.DirectoryServices package which can talk to AD and give us more information. I started writing a small application which can give me visual feedback on domain users.







So, I came up with above screenshots, and there were many more things possible with these APIs, but there were half-cooked api. So I had to figure out how do I things.

Now, I have active directory web interface, which allows me to do Administration using web browser. I have following features in this interface
  • Create New Users
  • Create Groups
  • Edit user group membership
  • Edit user properties
  • Edit group members
  • Display user status
  • Display group summary
  • Display computer summary
I think I will be able to open source it soon. But if you really want to use my application please send me an email and I will send you the app.

AdWebMin 0.1 is released!

Monday, December 12, 2005

So blogger hung!

and after getting my name from flickr! my blogger hanged!
I just got my name from flicker! and here it is

aJ Spraye30 cutler / / yoga

Monday, December 05, 2005

Microsoft's Half Cooked APIs

So when you publish APIs, what should you usually do? Say -

public string IWillReturnCaps(string anycase)
{
}

This is kind of self explanatory, and it tells me that If you give string in any case it will return Capital Letter String.

Microsoft has done a great job on publishing APIs on ActiveDirectory, called System.DirectoryService. These APIs look great on Surface! the time you dive in, you are almost dead, because when you prepared for diving in. You thought its 10 Ft Deep Water. But as soon as you get into water, you hit the face with rock solid surface and there is nothing to penetrate further. Some of the APIs are like this :

public willreturnobject IWillDoSomething(object givemesomething, object somethingmore, object andsoemthingmore)
{
}


This is called half cooked apis, you have the API, you need to figure it out what its going to do! The more concrete example can be - if you ask for properties - then documentation says, returns strings or values of properties? How many properties? Where are the properties, go figure out! Or do a enum or properties collection, use ADSI. Agreed! but why are properties not listed there. More over - if you are trying to do something, then you need to have basic concepts clear, should be able to write code in C++ or Visual Basic. There are not many examples which provide you with C# Code samples.

IRONY is that you are trying to do something with .NET but you need to use ActiveDS and COM Interop. Any way! if you go in that way - long time back you could not write a plugin for Visual Studio .NET in .NET Itself. If your plugin involves little bit of of GUI, you must use ActiveX.

If you are trying to do something with System.DirectoryServices then go here.

Btw- I am trying to write a Active Directory Web Administration Interface in ASP.NET - which will be available here soon.

Long time no see! Politics...

Internal Politics exists in every company, people are in rat race and thats something not gonna change. I wonder how many people actually read AND implement "rich dad poor dad". My point is that people give lots of gyan about professional ethics and team building. But sometimes all around I see that people are just there to pull strings or climb on other's shoulder to get something done.

I see no solution to it, other than get out of this RAT Race. I can see two of my friends are trying to do it and some how I feel that they are successful, namely Rajesh and Ravi. But I seriously see a problem over here - they have done it afterwards once they have been through it and it took them a lot of time to achieve this. Instead of getting out of this RAT Race! why can't we just fix it?

Thursday, September 15, 2005

Secure Wireless Access

Today was a good day, I have been trying to find out a special way to make my wireless secure! I could not find a nice and better solution in last 8 weeks, which can tell me that its not broken yet - of course there is nothing which is secure in this internet world; having said that - my solution sounds pretty secure! because I have found that lots of person (including nice companies in many countries use these techniques)

First - a Linux based solution - of course :-) - Ingredients as follows
  • Linux Kernel 2.4 or greater
  • Iptables - you do not have to know about IPTables
  • NoCat - nocat.net
  • DHCPD - plain vanilla dhcpd from distribution
  • Apache HTTPD 2.0
  • bind - optional
  • Wireless AccessPoint
Now - before you get to solution - you need to have a machine - which has two network cards.

This solution creates wireless network as different LAN and which has access to either your LAN or Internet using this Linux box which we are going to setup. Let call internal network 192.168.91.X (wireless) and external network 172.16.X.X (LAN/Internet). And this box has has 192.168.91.254(eth0) as internal network address and 172.16.1.1(eth1) as external network address

  • Setup DHCP - Plain vanilla default dhcpd.conf has range of 192.168.91.1 to 192.168.91.251
  • Setup bind - if you do not want to use name server - then you can provide your network's name server as main name server in dhcpd.conf
  • Setup HTTPD - and make it listen only on 172.16.1.1 - setup ssl on httpd
  • NoCat has two part AuthServ and Gateway - when you download nocat it comes with one tar, which will have both the things. by default nocat gets installed at /usr/local/nocat - but we are going to install AuthServ and Gateway on same machine - we will install authserv in /usr/local/nocat/authserver and gateway at /usr/local/nocat/gateway . you need to change makefile and change the directory in makefile and then execute either authserv and gateway targets respectively
  • You need to change configuration of AuthServ and Gateway and make appropriate changes, these files are well commented.
  • Now choose the authentication method, I choose samba and pointed it to my windows domain.

And if everything goes smooth, you are done, what you have to do is to hook up on wireless visit some site, it will redirect to NoCat authentication page, once authentication is done, it will update IPTables to give your machine access and you are done...

The other solution is RADIUS Server - get windows 2003 and configure it as radius server. Create a SSL Certificate, distribute it using group policy and allow user dialin access in their account management page and point your access point to use this windows 2003 server as radius server. And you get the access! the only problem with this is that you can not get Linux client hooked on it.