Quickzi: Stop Syslog from putting –MARK– in the logs

By default, the syslog daemon will place –MARK– messages in your /var/log/messages log file every twenty minutes. This can get annoying and eventually lead to a waste of space. Heres a quick tip on how to stop syslog from putting –MARK– in the messages log.

  1. Edit the syslogd file. (In Ubuntu, this file is located in /etc/default/syslogd – on some other distributions, you’ll want to edit whatever file starts up the syslog daemon.)
  2. Locate the following line that starts with:


  3. Modify this line to read:

    SYSLOGD=”-m 0″

  4. Restart syslog:

    /etc/init.d/sysklogd restart


Basic Linux Security Tips

William Stearns has a good write up on Linux security tips for first time Linux users.

Here are a few:

  1. Set up regular updates for your particular Linux distribution
  2. Lock your system when you step away from it. To lock the Gnome graphical desktop, run the following command, part of the “gnome-screensaver” package:gnome-screensaver-command –lockFrom a text console, run this, part of the vlock package:vlock -aFor KDE, right click on the desktop and select “Lock Session”. In Ubuntu, press Ctrl-Alt-l (the letter “Ell”, configurable in System/Preferences/Keyboard shortcuts). All require the password of the logged-in user to continue work.
  3. Do your day-to-day work with a non-root account. When you need to do root-level tasks, become root with “sudo” or “su” long enough to do the task (alternately, log in as root on a text console for this task). http://www.stearns.org/doc/sudo.current.html

Go check out the rest of the tips.

Quickzi: Get rid of the Ubuntu splash screen during boot

Ubuntu Boot Screen

Have you ever wondered what goes on behind the Ubuntu splash screen during the boot process? You know, the screen that has the orange progress bar and the Ubuntu logo. You may want to see if anything is failing during the boot process, or you may just want to see exactly what takes place behind the scenes. If you’re curious, theres a quick and easy way to get rid of it.

Get rid of the Ubuntu Splash screen temporarily:

  1. Reboot your computer
  2. Hit “Esc” when prompted in order to enter the GRUB menu.
  3. Select the proper kernel and hit the letter “e” to edit.
    Ubuntu Grub Menu
  4. Arrow down to the Kernel line, and hit the letter “e” again.
    Ubuntu Grub Menu
  5. You should see the last few words in the line. Remove the words “quiet splash” and hit enter.
    Ubuntu Grub Menu
  6. Hit the letter “b” to boot the kernel without the Ubuntu splash screen. Below is what it will look like.
    Ubuntu Grub Menu

Get rid of the Ubuntu Splash screen permanently:

  1. From the command line, edit the /boot/grub/menu.lst file. Near the bottom of the file, you will find some lines similar to this:

    title Ubuntu 7.10, kernel 2.6.22-14-generic
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=xxxx ro quiet splash
    initrd /boot/initrd.img-2.6.22-14-generic

  2. Change the above to look like this:

    title Ubuntu 7.10, kernel 2.6.22-14-generic
    root (hd0,0)
    kernel /boot/vmlinuz-2.6.22-14-generic root=UUID=xxxx ro
    initrd /boot/initrd.img-2.6.22-14-generic

  3. Save the file and exit.


Quickzi: How to determine file types on Linux

Need to find out what all the file types in a certain directory are? Simple!

Execute the following on the command line:

find /path/here/ -type f -print | xargs file

I typed: find /home/adam/test/ -type f -print | xargs file

The output will look something like this:

/home/adam/test/music.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 44100 Hz
/home/adam/test/package.deb: Debian binary package (format 2.0)
/home/adam/test/file.tar.gz: gzip compressed data, from Unix, last modified: Tue Jun 20 12:51:11 2006
/home/adam/test/widget.xml: ASCII text, with CRLF line terminators
/home/adam/test/logfile.txt: empty


Command Line Progress Bar

Have you ever had to copy a fairly large file on the command line and wondered what the progress was? The command line progress bar seems to do a decent job at showing the percentage and estimated time of a copy.

Description from the site:

Bar is a simple tool to copy a stream of data and print a display for the user on stderr showing (a) the amount of data passed, (b) the throughput of the data transfer, and (c) the transfer time, or, if the total size of the data stream is known, the estimated time remaining, what percentage of the data transfer has been completed, and a progress bar.

Bar was originally written for the purpose of estimating the amount of time needed to transfer large amounts (many, many gigabytes) of data across a network. (Usually in an SSH/tar pipe.)

Go check it out!

Quickzi: How to Jail VSFTPD Users

If you’re worried about FTP users exploring outside of their home directory, you want to set up what is called a chroot jail.

To do this, open the /etc/vsftpd.conf file:

vim /etc/vsftpd.conf

and make the following modifications (line should be uncommented):


After you save the file, restart vsftpd:

/etc/init.d/vsftpd restart

Now all users will be jailed to their own home directory when using FTP.
Now, lets say you only want to jail certain users, and allow other users to browse other directories. To do this, you’ll want to again edit the configuration file.

vim /etc/vsftpd.conf

uncomment the following lines:


After you save the file, restart vsftpd:

/etc/init.d/vsftpd restart

Now you will need to create the /etc/vsftpd.chroot_list file and add in users you do NOT want to jail. By default, all users will be jailed. In the /etc/vsftpd.chroot_list file you can specify what users to allow to browse all directories.

ColorMake: A colorful make output

ColorMake is a neat wrapper script written in Perl that generates a colorful make output when compiling an application on the Linux command line. Once installed, basically all you need to do is type “cmake” or “clmake” whenever you would ordinarily type “make”. This is useful for those of us who like to compile from source and want to be able to distinguish between output lines. Go check it out.

Replacing Windows with Linux

There is a great article written by Ashton Mills at APCMag titled SUPERGUIDE: The Open Source Challenge. How to replace Windows completely with Ubuntu.

Ashton essentially delves into the article with the assumption that Windows does everything we need, and explores the possibility of Linux and open source measuring up with a rating system.

When I was first given this task I had to sit and blink a few times, if for nothing else than dramatic pause. I’m a self-confessed Linux nut, as some of you may know, but even I’m cautious to do away with Windows completely. There’s a reason I have a dual-boot Windows and Linux machine. Several of them, in fact.
But have I just been conditioned into using Windows because of past experience, or applications, or file formats, or the myriad other reasons that make Windows a comfort zone because it’s all so familiar?

Check the rest of it out.

Linux Kernel 2.6.23

The Linux Kernel version 2.6.23 was released yesterday, October 9th, 2007 that includes some great improvements.

2.6.23 includes the new, better, fairer CFS process scheduler, a simpler read-ahead mechanism, the lguest ‘Linux-on-Linux’ paravirtualization hypervisor, XEN guest support, KVM smp guest support, variable process argument length, make SLUB the default slab allocator, SELinux protection for exploiting null dereferences using mmap, XFS and ext4 improvements, PPP over L2TP support, the ‘lumpy’ reclaim algorithm, a userspace driver framework, the O_CLOEXEC file descriptor flag, splice improvements, new fallocate() syscall, lock statistics, support for multiqueue network devices, various new drivers and many other minor features and fixes.

Check out the rest of whats new in the Linux Kernel 2.6.23..