Linux SCSI Persistent Device Detection

Many of us might be aware of the block level encryption features (LUKS for example) provided in Linux.

Most of the articles that I referred to over the internet mention the usage of the traditional scsi block device when creating it as an ecrypted device. Eg. sudo cryptsetup luksFormat /dev/sdb1

This actually poses a problem. The problem is with the way Linux detects SCSI devices. While many distributions have shifted to using ID/LABEL based access to devices, users still use the old traditional way of using a device. This turns out to be a problem in cases like suspend/resume where devices are rediscovered. Technically there is no guarantee that the device you see currently as sda will be named sda again on reboot/resume. While we don’t see issues like this with attached disks, the issue can be easily reproduced in a SAN Enviornment or in cases where users use external hard drives using USB.

[Read More]
Categories: Tools Computing 

Linux Power Management

I must admit, Linux Power Management is Fuckin’ Pathetic.

On a Dell XPS M1210 Laptop with a 6 Cell battery, I get a shitty 15 mins of power backup compared to 2 hrs on Microsoft Windows XP.

And woo, On my IBM T43 running Microsoft Windows XP, I watched a full movie on battery, and it still survived.

The Linux running laptop had no sound enabled.

Yes, Yes Yes!!! As many would say

[Read More]
Categories: Debian-Pages Computing 

ANSI Color Codes

So in the search of finding a simple solution for printing colored text in python, it took me some time to dig up. Most solutions people have done were using curses or some modules. My ultimate intention has always been to cut down on the dependency on the 3rd party modules.

I think the ANSI Color Codes would be good enough for my requirements to print colored text on an ANSI compliant terminal.

[Read More]
Categories: Computing 

Data Synchronization in KDE

Synchronization is one of the common problems I face with my multiple machines. This article is about how KDE help me in keeping my data synchronized across machines without any problem.

Categories: Debian-Pages Computing 

ctime, atime and mtime

ctime, atime and mtime

It is important to distinguish between a file or directory ’s change time (ctime), access time (atime), and modify time (mtime).

ctime -- In UNIX, it is not possible to tell the actual creation time of a file. The ctime–change time–is the time when changes were made to the file or directory ’s inode (owner, permissions, etc.). It is needed by the dump command to determine if the file needs to be backed up. You can view the ctime with the ls -lc command.

[Read More]
Categories: Computing Technology 

Secure P2P Sharing

First,

DISCLAIMER: I ’m not a guru, I’m just a learner. So there might be a chance that the whole article might be fundamentally wrong.

I thought of this because I use P2P network a lot.

On my laptop, which is the repository of everything I have, it is necessary for me to make sure that it is secure enough.

To firewall it I use the single rule from iptables:

[Read More]

MacInDell

Just how would it look if Mac were to come with Dell laptops.

The screenshot might give some picture.

Categories: Debian-Pages Fun Computing 

New SSH Session in Konsole

Some quick steps to create an Option for “New SSH Session” under Konsole which includes keychain and ssh-agent for password-less ssh logins.

I’m using a Debian system but majority of the steps should be common across all distributions.

  1. Install keychain and openssl-client programs (ssh-agent is part of openssl- client package under Debian)
    rrs@laptop:~ $ apt-get install keychain openssl-client

  2. Add the following lines to your .bashrc file

    For SSH

    For now I’m gambling the linux session for ssh-agent.

    I’ll have to find a better way in the future. 30/09/2005

    if [ $TERM == linux ]; then

    [Read More]
Categories: Tools Computing 

POP3 SSL && Fetchmail

Small HOWTO on configuring POP3 SSL with Fetchmail.
Here I assume that the server’s SSL certificate is a Self Signed Certificate

  1. openssl s_client -connect mail.logicalwebhost.com:995 -showcerts
    Execute this command to fetch the details of the server and also the certificate.
    The output will be something like below:

rrs@laptop:~ $ openssl s_client -connect mail.someserver.com:995 -showcerts
CONNECTED
depth=0 /C=US/ST=CA/L=San Jose/O=Some Internet Hosting Services/OU =Automatically-generated POP3 SSL key/CN=mail.somehost.com/emailAddress=postmaster@researchut.com
verify error:num=18:self signed certificate
verify return:1
depth=0 /C=US/ST=CA/L=San Jose/O=Some Internet Hosting Services/OU =Automatically-generated POP3 SSL key/CN=mail.somehost.com/emailAddress=postmaster@researchut.com
verify return:1

Certificate chain 0 s:/C=US/ST=CA/L=San Jose/O=Some Internet Hosting Services/OU=Automatically-generated POP3 SSL key/CN=mail.somehost.com/emailAddress=postmaster@researchut.com i:/C=US/ST=CA/L=San Jose/O=Some Internet Hosting Services/OU=Automatically- generated POP3 SSL key/CN=mail.somehost.com/emailAddress=postmaster@researchut.com

[Read More]
Categories: Tools Computing