Posted on January 20, 2009 by
Riyesh .
Scenario
To log into “Server A” from “Server B” without using passwords. Users for both the server will be “root”
Process
Login to “Server B” as root user and generate key for the root user. No need to enter any passphrase while generating this key.
ssh-keygen -t rsa
Once the key is generated, copy the …
Posted on January 18, 2009 by
Riyesh .
“find” is a versatile tool which can be used to locate files and directories satisfying different user criteria. But the sheer number of options for this command line tool makes it at the same time both powerful and encumbering for the user.
Here are a few combinations which one can use to …
Posted on January 18, 2009 by
Riyesh .
You can disable/enable safe_mode either using .htaccess, php.ini or httpd.conf file. Selecting the right way depends on your php-apache configuration.
If php is compiled as a dso module for apache, you will have to use .htaccess method
If php-apache relationship is CGI, then php.ini file is used to disable safe_mode value
If none …
Posted on January 16, 2009 by
Riyesh .
Purpose
Unless the ftp users are limited to their home directories, they will able to access all files & folders on the server .
How to
Below you may see how this can done to 3 of the ftp servers used in common.
Pro-ftpd
vsftpd
pure-ftpd
Pure-ftpd
vi /etc/pure-ftpd.conf
And change the following line
ChrootEveryone=YES
pro-ftpd
vi /etc/proftpd.conf
DefaultRoot …
Posted on January 4, 2009 by
Riyesh .
ImageMagick® is a software suite to create, edit, and compose bitmap images. It can read, convert and write images in a variety of formats (over 100) including DPX, EXR, GIF, JPEG, JPEG-2000, PDF, PhotoCD, PNG, Postscript, SVG, and TIFF. Use ImageMagick to translate, flip, mirror, rotate, scale, shear and transform images, adjust image …
Posted on January 4, 2009 by
Riyesh .
This is an awasome feature of hylafax. User can send fax using email applications. Ex: riyesh@23656237.fax
We need to add some simple scipts to activate this feature.By defult hylafax will not decode the attachments.So you need to edit /etc/hylafax/hyla.conf.
specify mime type directory location in /etc/hylafax/hyla.conf
add the following line
MIMEConverters: /var/spool/hylafax/mimetype
Then create the …
Posted on January 4, 2009 by
Riyesh .
HylaFAX is the leading fax server for Unix-like computer systems. It uses a client-server design and supports the sending and receiving of faxes.
Prerequisites
C++ Compiler
C++ Runtime Libraries
libtiff
Ghostscript
AWK
MTA (ex: postfix, qmail, sendmail, exim)
Installation
Download the lates source package from following url.
cd /usr/src
wget http://prdownloads.sourceforge.net/hylafax/hylafax-5.2.8.tar.gz?download
Extract the source package
tar zxvf hylafax-5.2.8.tar.gz
Compiling and installation
cd hylafax-5.2.8
Configure the …
Posted on January 3, 2009 by
Riyesh .
A sample BASH CGI script for collecting IPs of your colleagues in your network.
Prerequisites
1) apache/cgi configuration
2) a Mysql installation
Then create script “getip.sh” under “/var/www/cgi-bin/” ( set location of cgi-bin directory as per the apache configuration)
#!/bin/bash #Getting IP address CGI-BASH-script#Jadu Saikia http://unstableme.blogspot.com/ #MySQL settings
# MHOME= ( location of mysql …
Posted on January 2, 2009 by
Riyesh .
Required packages
Apache
OpenSSL
j2sdk
jakarta-tomcat
jakarta-ant
jakarta-tomcat-connectors(mod_jk)
Configure Environment Variables
Edit and add the lines below to “/etc/profile”
JAVA_HOME=/usr/local/java/java
CATALINA_HOME=/usr/local/tomcat
PATH=$JAVA_HOME/bin:$PATH:$HOME/bin:/sbin:/usr/sbin
CLASSPATH=$CATALINA_HOME/bin/bootstrap.jar:$JAVA_HOME/lib/tools.jar:$CATALINA_HOME/common/lib/servlet.jar:/usr/local/pgsql/share/java/postgresql.jar:../lib/struts.jar:.
Now add the PATH JAVA_HOME CATALINA_HOME & CLASSPATH if any aren’t in the export line
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE INPUTRC JAVA_HOME CATALINA_HOME CLASSPATH
Install Java
mkdir /usr/local/java
cd /usr/local/java
sh jdk-1_5_0_04-linux-i586.bin
The jdk directory is then extracted
mv jdk-1_5_0_04 /usr/local/java
ln -s jdk-1_5_0_04 java
Now the …
Posted on January 1, 2009 by
Riyesh .
Extracting RPM
We can try this with apache rpm
cd /usr/src
wget http://www.apache.org/dist/httpd/binaries/rpm/i386/httpd-2.0.59-1.i386.rpm
extract rpm using rpm2cpio command
rpm2cpio httpd-2.0.59-1.i386.rpm | cpio -idmv
rm -rf httpd-2.0.59-1.i386.rpm
Output:
./etc/…
./usr/..etc..
./var/…etc.
list the location
ls
Output:
etc var usr