Enable SSI on Apache2 under Ubuntu

Tested on: – Ubuntu Linux 10.10 Maverick Meerkat (2010-11-21) – Ubuntu Linux 7.10 Gutsy Gibbon – Ubuntu Linux 6.06 Dapper Drake – Ubuntu Linux 5.10 Breezy Badger   1)  Optional: Install the Apache2 httpd server if not already installed. sudo apt-get install apache2 2) Create the following symlink. sudo ln -s /etc/apache2/mods-available/include.load /etc/apache2/mods-enabled 3) Open…

Recording a session for a user when he / she logs in ssh

  To start recording each session add this to the users .profile file DATE=$(date +”%Y%m%d%H%M”) mkdir /log/$DATE script -t 2>/log/$DATE/bashlogs.timing -aqf /log/$DATE/bashlogs.script   to playback go to /log/<timestamp> and run scriptreplay  bashlogs.timing bashlogs.script 3 where the 3 is the speed up factor. nJoy;  

Change Hostname Permanently on Debian or Ubuntu

Debian based systems use the file /etc/hostname to read the hostname of the computer at boot time and set it up using the init script /etc/init.d/hostname.sh We can edit the file /etc/hostname and change the hostname and then run: /etc/init.d/hostname.sh start Steps: 1. sudo vim /etc/hostname 2. Save the file with the hostname you like…

Querying network card information and status

Great tool for checking ethernet NIC information in linux: ethtool In ubuntu you might need to install it like so : sudo apt-get install ethtool The tool is easy to use:   Use ifconfig -a  to list nics then   root@wo1:~# ethtool p4p1 Settings for p4p1: Supported ports: [ TP ]        …

Convert DEB to RPM or RPM to DEB Package

You can convert DEB file to RPM package and RPM to DEB package using alien command, if you have a *.rpm file that you want to install on a Debian or Ubuntu. Convert RPM to DEB Install alien command on Ubuntu as mentioned here: # sudo apt-get install alien Now, use alien command to convert…

One Liner Email from bash

Simple: # echo “This will go into the body of the mail.” | mail -s “Hello world” you@youremailid.com nJoy 😉  

How to Auto-Unlock Keyring in Ubuntu 12.04, 12.10

One of the benefits of using Ubuntu OS is it comes with build-in security/safety/privacy feature. One of this feature is a keyring manager application that stores and manage your password for your credentials. This feature is really useful to keep your credentials safe and no one can unlock them, except you of course, even if…

Bash While Loop Example

How do I use bash while loop to repeat certain task under Linux / UNIX operating system? How do I set infinite loops using while statement? The bash while loop is a control flow statement that allows code or commands to be executed repeatedly based on a given condition. For example, run echo command 5…