Operating System Server Configuration

Linux Password reveal


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


and here we store its password


now shadow file has column seperated by [ : ] colons
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


$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


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

Server Configuration

Cpanel using Exim as MTA

After searching for a day, at last I am confirmed that Cpanel use only exim, Its simple that I can ask them, but believe me I have a post in their forum that doesn’t have reply until one day past 🙁

And now I am able to install exim on my PC. A Bit different from other softwares that I install on linux box from source.
Actually I miss “configure” file for it…

But at the end I read its README and all is done as a piece of cake.

So In future , do read README or INSTALL or such files before doing something new.

Operating System Server Configuration

Linux Problems


I have been trying sendmail and Exim for whole day. Looking what exactly they are and how to use them. But still stuck on what they are. I found Sendmail and Exim both are MTA (Mail Transfer agent), but still my Cpanel installation shows that I have sendmail and exim install on same server, How can this be? If I have sendmail listening on Port 25 than where exim is listening for email?

Anyone any idea please post comment so that I can work on my project.

thanks everyone

Sumit Gupta