Thursday, June 29, 2006

Linux Password reveal

Hi, I just discover how a Linux password is formed. This information is useful for those who have to write a piece of code for their software to either match user authentication or make new user from their script. Though Linux Provide PAM for the purpose, but for me configuring PAM for you application that can generate its password itself is not useful. But its recommended as its General application and if in future Linux authentication method or password saving change you can easily adopt to it. Anyways, here is where we store User information in linux /etc/passwd and here we store its password /etc/shadow now shadow file has column seperated by [ : ] colons like sumit:$1$YgUxVnSK$/Y/QjCfBDyoZriQ7oQnxs.:13316:0:99999:7::: in this it tells there is a user call sumit with password as $1$YgUxVnSK$/Y/QjCfBDyoZriQ7oQnxs. This password is divided in Three parts seperated by $ (dollar) sign. $1 is indication of fact taht its an MD5 crypted password $YgUxVnSK is the salt use to crypt the password $/Y/QjCfBDyoZriQ7oQnxs. is the password But these values are read without $ sign :o) So if you need to make a linux password simple take a Salt for your Password encryption and crypt your password with it and than append $1 with both values and write it in Shadow file.. simple in PHP its quite simple to do ...just call crypt function with out any salt like $password= crypt("mypassword"); And in PERL you need to ensure a random salt as crypt function of perl produce different result on windows and on Linux :o( in windows machine crypt function call will be $password= crypt("mypassword",""); produce some thing like /Y/QjCfBDyoZriQ7oQnxs. where as in linux it will be full linux password style Hope I am clear in telling linux password, as programmer you don't need to know more on this... Sumit Gupta

Tuesday, June 20, 2006

C++ code complete

Yes, I complete my first C++ code, it took me around 10 Hours to write simple code, which an expert might take only 2 hrs to write, but since there are few things that I never tried in C++, and with my other work load, its good to do that in that less time... Now, I have to test that code and once I does that I will be very thank ful for those help me write this code... Thanks to all for reading this. Sumit Gupta

Sunday, June 18, 2006

C++ : Quite a Good thing

As a Programmer you always want to program in C++, but also if you don't know this language you don't dare to learn it: atleast this is what I saw in my surrounding and fellow developers. I learn C++ while doing my high school, this experience doesn't include any work commerical project or for matter any kind of project accept making some basic Alogrithm Function that one learn while learning any programming language. But since than, I never touch C++, I always want to programme in it. Know I get a chance to try my hand in this Dream Language of mine. I have to make Custom Authentication Module for Courier Imap, and you know what I doesn't know any Unix Standard for this as I never work on C++ for *nix System. Though I haven't write my code yet, but tomorrow (if come for me :o) ) I will write that historic code for me, My First Professional C++ Code, and I will ask my company to allow me to post it on Net for every one looking for that code. (but don't be hopefully in getting code, but you know you can asking on how to do it anytime.) So I am waiting for "tomorrow" to come only 17 Hrs + left for me to write that code... waiting ... Sumit Gupta

Wednesday, June 07, 2006

Resource Management

I have been working as Software Developer from last 2 yrs. During this time I come across lot of good and bad things about project management. To my experince with project management most of project we got in trouble are due to bad coding level or bad planning of project. These are two things that trouble me a lot in these two years. This also teach me to make balance between different level of programmer working on same project. One thing that i notice is that good level programmers fight with problem like how to make code efficient where as low skill programmer keep themself busy with questions like How to make query, how to make Text box to do this and that, or user interface has some bugs how to fix them. Though recently i come across one another major problem with project management, proper resource allocation, with resources i mean hardware and software and not man power, One of my project got delay just because of late supply of hardware, now as a programmer thats the worsts thing I want in my project to get delay because we don't have proper hardware or software for that matter. One can teach Junior programmer programming skill but management budget handling is not in our hand as Programmer. Anyways life is now on road as my Three week long quest ends when I Configure EXIM and now its delivering mail to my virtual mail box :) So rest about management when I learn to manage myself and my projects (this counter always remain above 5 ) Sumit Gupta