Quick Rootkit Check

December 2nd, 2010 Category: Linux Server

If you are running your own Linux server connected to the internet it’s a good idea to check if your server is infected from a rootkit. This can be achieved using a few command lines:

cd /root
wget --passive-ftp ftp://ftp.pangeia.com.br/pub/seg/pac/chkrootkit.tar.gz
tar xvzf chkrootkit.tar.gz
cd chkrootkit-0.49/
make sense
./chkrootkit

Check the output, if you get output indicating “INFECTED” then you should re-install your server and do everything to avoid further infects.

Status of a Software RAID under Linux

February 14th, 2010 Category: Linux, Linux Server

You might want to check the rebuild status of your Linux software RAID e.g. after a disc failure or a hard server crash. As you know this might take several hours, depending on the disc size.

In my case mdadm is used to configure the software RAID and mdadm –detail /dev/md1 can be used to show the rebuild status:

[root@hxxxxxxx ~]# mdadm --detail /dev/md1
/dev/md1:
Version : 00.90
Creation Time : Thu Nov  9 18:57:15 2006
Raid Level : raid1
Array Size : 159726144 (152.33 GiB 163.56 GB)
Used Dev Size : 159726144 (152.33 GiB 163.56 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 1
Persistence : Superblock is persistent
Update Time : Sun Feb 14 19:45:21 2010
State : active, resyncing
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Rebuild Status : 31% complete
UUID : be29700c:083d0c62:67a9c130:e044323b
Events : 0.3626065
Number   Major   Minor   RaidDevice State
0       8        3        0      active sync   /dev/sda3
1       8       19        1      active sync   /dev/sdb3

In my case 31% of the rebuilt process are finished. We still have to wait a little bit..

Links

Bash Prompt too long?

May 5th, 2009 Category: Linux

People often using Putty, xterm or any other Linux test based console will probably now this annoying issue:

  • Changing into a deeper directory structure will create an incredible long bash prompt

For me it was quite annoying to have the prompt sometimes wider than the terminal window. In Debian standard configuration this is the case. So I decided to shorten the prompt.

I kept my prompt very simple, the only thing you have to do is to add the following lines to your ~/.bashrc

export PS1="[\u@\h \W]\\$ "
export PS2="> "

Make sure to add it at the end of your .bashrc file in your home directory. Otherwise it may be overwritten by other prompt definitions in your .bashrc.

Before

harry@h1096660:/usr/local/include/ffmpeg$

After

[harry@h1096660 ffmpeg]$

Better :)

Further links and examples

Linuxcaffe in Toronto

March 28th, 2009 Category: Fun, General, Linux

Received from a friend while he was on a holiday trip in Toronto. A Linuxcaffe pretty cool I think. Nowadays Linux seems to be everywhere! Thank you Bogi for this nice shot.

img_6842.jpg

Linux under Windows with andLinux

March 25th, 2009 Category: Linux, VMWare

Nowadays there are several virtualization products like VMWare and Virtual PC available. Searching the Internet I came across coLinux and andLinux. This free and open source tools allow you to run Linux natively on your Windows PC.

coLinux is the base – a port of the Linux kernel which allows you to run Linux cooperatively on your Windows PC. andLinux is a complete Ubuntu Linux system which uses coLinux, Xming as X server and PulseAudio as sound server.

I’ve tried andLinux on my Windows XP notebook, installation was easy. Quite nice if you also want to have Linux running on your PC without purchasing other products. You can start Linux applications and they appear like a regular Windows application on your desktop.

andLinux offers some more features:

  • Access from Linux applications to Windows filesystem
  • Quick start of Linux applications from Quicklaunch bar
  • Easy start of applications from KDE Start menu

See also:

Definitely a try worth!

andlinux.jpg