Proper Way to Generate MD5 Hash for XCache Administration Password with md5sum or PHP

XCache is a PHP opcode cacher, more commonly known as PHP accelerator that speeds up PHP-based web pages serving and reduces web server load. XCache comes with a web-based administration page (admin-page) user interface that allows administrators or webmasters to monitor and operate the PHP opcode cache in the memory with the performance statistics. To use this admin-page, an user ID and password have to be defined in PHP.INI configuration file under xcache.admin.user and xcache.admin.pass parameter to authenticate the http-auth process.

For security purpose, password value entered in xcache.admin.pass has to be the MD5 hash. When user go to XCache admin-page, the http-auth will prompt to ask for user name and password credential. If the MD5 hash value for the password that user wants to use and assumed to be correct, is in fact a wrong one, then user will unable to login to the admin-page.

To generate the MD5 hashes for your desired password for XCache admin-page in PHP.INI, there are plenty of methods. The following two ways are some of the simplest way to get the password’s MD5 value without compromising security by transmitting password across network or Internet in plain text.

PHP Script

Create a new PHP script page on the webserver, and place the file within a website or virtual directory accessible from Internet:

<?php
echo md5(”password”);
?>

After saving the file with any name, request it from web browser using your domain name and get the MD5 hash value for your password, and update PHP.INI with the value.

md5sum

md5sum is a computer program which calculates and verifies MD5 hashes, and is installed by default in most Unix, Linux, and Unix-like operating systems or compatibility layers, including CentOS, the popular operating system for web hosts.

To generate MD5 hash value for the password using md5sum, the correct syntax is as follow:

echo -n “password” | md5sum

SSH to the server and run above command, the enter the value generate into PHP.INI.

In both cases, restart Apache web server after editing PHP.INI to make the changes effective.


3 Responses to “Proper Way to Generate MD5 Hash for XCache Administration Password with md5sum or PHP”

  1. How to Calculate and Generate MD5 Hash Value in Linux and Unix with md5sum » My Digital Life
    December 10th, 2008 02:26
    3

    [...] servers powered by cPanel or Plesk, where administrators or webmasters have to commonly generate MD5 hash for the password used in PHP scripts or other web [...]

  2. michosn
    April 24th, 2008 10:24
    2

    i found many sites that give md5 coding and decoding like
    http://www.joomlaaa.com/md5-coding-decoding
    i do not know how they can decode md5
    anyone know a script to decode md5?

  3. vlader
    April 22nd, 2008 19:54
    1

    The correct script is

    Without “” in ().

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.
Custom Search

New Articles

Incoming Search Terms for the Article

linux md5 password - how to generate md5 password - create md5 password - generate md5 linux - linux hash generator - make md5 linux - md5 password linux - generate linux md5 password - how to create md5 password on linux - linux create md5 password - linux generate md5 - linux password md5sum - linux md5 password - linux generate md5 password hash - make md5 hash password - MD5 Password DEMO download - md5 hash generator linux path - md5sum password create - "generate password" spring - generate your MD5 hash passwords 2009 - linux hash pasword - md5 generate password hash linux - linux md5 hash - md5 hash linux - ssh generate md5 sum - generate md5sum passwords - linux md5 password generator - linux generate digest hash - MD5SUM create password - password encryption md5sum - Spring Security + password md5 - windows md5sum password - decode hashes page yahoo user - linux hashing passwords - md5sum password - md5 linux pass hash - generate md5 hash linux - how to generate ssha hash - linux md5 passwort hash - linux md5 hash password - md5sum password linux - md5sum passwords - create md5 hash linux file - generating password using md5sum - generate md5 password linux - how to set md5 on a password in linux - how to generate an md5 password - linux md5 passwort - md5sum linux pass - md5 hash password linux -