Linux/Unix/BSD - oldest to most recent
Information and reviews on Linux, UNIX and BSD operating systems
Unix is a multi-user, multi-tasking operating system that was initially developed by Bell Labs in the 1970s. Various similar operating systems that are POSIX compliant (ie compatible with Unix) have since been developed (POSIX is an abbreviation for Portable Operating System Interface for UNIX). These include the following: the BSD family (OpenBSD, FreeBSD, NetBSD, Mac OS/X), Solaris, IRIX, AIX, SunOS, UnixWare, OpenServer and Linux.
Software written for POSIX compliant operating systems is generally able to be compiled for all POSIX platforms with little or no platform-specific changes. This makes the commands and utilities available for this extended family of operating systems very similar, and there are few differences between administering them.
The articles in this section are about useful command line utilities and commonly used application software on POSIX compliant operating systems.
Post sort order: Post Date (Newest First) | Post Date (Oldest First) | Alphabetical | Date Updated
How to check an MD5 hash on a file
Posted January 19th, 2004 in Linux/Unix/BSD (Updated May 23rd, 2007)
MD5 is a one-way hash algorithm which can be used for security or to verify the integrity of a file as it creates a digital signature for a file.
Save a Unix manpage as plain text
Posted January 19th, 2004 in Linux/Unix/BSD and Man Pages (Updated May 24th, 2005)
This article details how to save man pages as human readable plain text files. Man page is an abbreviation for Unix and Linux manual pages which form the basis of the help system for command line utilies.
Error Compiling Sablotron on FreeBSD
Posted February 12th, 2004 in Linux/Unix/BSD (Updated May 23rd, 2007)
This article deals with two compilation issues when compiling the Sablotron libraries versions 0.98 and 1.01 on FreeBSD 4.9. It probably also affects other versions of Sablotron and FreeBSD.
Error Compiling Sablotron on FreeBSD - Make: don't know how to make ./jsdom-ref/complete.
Posted February 12th, 2004 in Linux/Unix/BSD (Updated May 23rd, 2007)
This article deals with two compilation issues when compiling the Sablotron libraries versions 0.98 and 1.01 on FreeBSD 4.9. It probably also affects other versions of Sablotron and FreeBSD.
Create RSA and DSA Keys for SSH
Posted March 5th, 2004 in Linux/Unix/BSD (Updated May 24th, 2005)
Private and public RSA and DSA keys can be generated on Unix based systems (such as Linux and FreeBSD) for use with SSH. The ssh-keygen command allows you to generate, manage and convert these authentication keys.
Manpage for ssh-keygen
Posted March 5th, 2004 in Linux/Unix/BSD and Man Pages (Updated May 24th, 2005)
Private and public RSA and DSA keys can be generated on Unix based systems (such as Linux and FreeBSD) for use with SSH. The ssh-keygen command allows you to generate, manage and convert these authentication keys.
How to use a flash card reader with Linux
Posted March 24th, 2004 in Linux/Unix/BSD (Updated May 24th, 2005)
This article looks at how to mount a USB flash card reader and flash cards plugged into it with Linux. Also covered is how to make it easy to mount with a desktop icon in KDE and how to scan the SCSI bus to locate the device name and number.
Mounting a flash card reader with a KDE desktop icon
Posted March 24th, 2004 in Linux/Unix/BSD (Updated May 24th, 2005)
This article looks at how to create a desktop icon in KDE which can be used to mount a flash card reader or similar device, whether it's a CD-ROM, DVD reader etc. Once the icon is set up on the desktop it can also be used to unmount the device.
How to use a flash card reader with Linux - How to scan the SCSI bus
Posted March 24th, 2004 in Linux/Unix/BSD (Updated May 24th, 2005)
This article looks at how to use the sg_scan and sg_map utilities to scan the SCSI and USB bus to determine the device name and number for mounting USB devices on Linux.
FreeSBIE - Live Bootable FreeBSD
Posted July 16th, 2004 in Linux/Unix/BSD (Updated March 25th, 2005)
FreeSBIE is a live, bootable CD based on FreeBSD (like Knoppix and Ubuntu for Linux). Pop the CD into your CDROM, reboot the system and you have a live working FreeBSD system using the XFCE desktop without harming the rest of your system.
FreeSBIE - Live Bootable FreeBSD - Desktop Screenshot
Posted July 16th, 2004 in Linux/Unix/BSD (Updated May 23rd, 2007)
FreeSBIE is a live, bootable CD based on FreeBSD (like Knoppix and Ubuntu for Linux). Pop the CD into your CDROM, reboot the system and you have a live working FreeBSD system using the XFCE desktop without harming the rest of your system. This page has a screenshot of FreeSBIE when the system has first booted up.
FreeSBIE - Live Bootable FreeBSD - Desktop Screenshot
Posted July 16th, 2004 in Linux/Unix/BSD (Updated May 23rd, 2007)
FreeSBIE is a live, bootable CD based on FreeBSD (like Knoppix and Ubuntu for Linux). Pop the CD into your CDROM, reboot the system and you have a live working FreeBSD system using the XFCE desktop without harming the rest of your system. This article has a screenshot of FreeSBIE after booting up and opening a couple of applications.
FreeSBIE - Live Bootable FreeBSD - Root Message File
Posted July 16th, 2004 in Linux/Unix/BSD (Updated March 25th, 2005)
FreeSBIE is a live, bootable CD based on FreeBSD (like Knoppix and Gnoppix for Linux). Pop the CD into your CDROM, reboot the system and you have a live working FreeBSD system using the XFCE desktop without harming the rest of your system. This page shows the root message from when you first boot the system.
Howto Mount an ISO Image with FreeBSD
Posted December 14th, 2004 in Linux/Unix/BSD (Updated January 18th, 2008)
This article covers how to mount an ISO image using FreeBSD that you might have created with a utility like mkisofs or have downloaded an ISO image from a website or FTP archive.
Starting and Stopping Sendmail with FreeBSD
Posted December 17th, 2004 in Email Servers and Linux/Unix/BSD (Updated May 24th, 2005)
Management of sendmail is done on FreeBSD by changing to sendmail's directory (/etc/mail) and running "make" followed by the appropriate command. This either needs to be done as root or using sudo.
Prevent hostname lookups with openssh sshd
Posted September 5th, 2007 in Linux/Unix/BSD and Networking
When you connect to an OpenSSH sshd server, it is configured by default to do a hostname lookup on your IP address. If there are any issues with the DNS configuration on the host machine, or with the DNS server it is using, this can lead to a delay when logging in using ssh for around 30 seconds. It is very easy to switch this host name lookup function off in the sshd_config file.
Overriding the AWStats LogFile Configuration Option
Posted September 7th, 2007 in Apache and Linux/Unix/BSD
I run AWStats on one of my servers and it copies files over from some of the other servers I manage every 15 minutes and processes them. However, I had a server issue yesterday with the machine that AWStats runs on, and it meant the auto process which copies the files over and runs AWStats stopped running for about 12 hours. The end result was some lost information and needing to regenerate stats for the month to date. I needed to override the AWStats LogFile configuration directive on the command line to be able to do this.
Installing Geo IP PurePerl
Posted September 18th, 2007 in Linux/Unix/BSD (Updated September 18th, 2007)
I process logs on my webservers using AWStats, and use the GeoIP plugin to translate IP addresses into country codes. This article looks at how to install the Geo I PurePerl plugin, which is used by AWStats, and also how to download and install the Geo IP database files which are required by this plugin. The server I installed this onto was a CentOS 5 server, but the instructions here should work equally well on other Linux distributions.
Inadvertent upgrade from openSUSE 10.2 to openSUSE 10.3
Posted September 19th, 2007 in Linux/Unix/BSD (Updated September 28th, 2007)
I had installed openSUSE 10.2 on my primary desktop machine (which has a dual core 64 bit AMD processor) in December 2006, but there never seemed to be any updates available in the little Yast Online Update taskbar applet which is supposed to alert you to updates and security patches etc. I found this a little surprising but was always to busy to do anything about it. This post looks at how to configure the Yast Online Update applet, and also how I inadvertently managed to update from openSUSE 10.2 to Release Candidate 1 of openSUSE 10.3.
Installing AWStats on CentOS
Posted September 26th, 2007 in Apache and Linux/Unix/BSD
AWStats provides a useful overview of website statistics from your Apache log files. There is no automatic way to install AWStats on CentOS using yum, so this article looks at how to install AWStats on CentOS. The instructions below should also work on other Linux distributions that do not have an automatic way of installing AWStats.
New_Face failed error when using MPlayer
Posted October 10th, 2007 in Applications and Linux/Unix/BSD (Updated October 10th, 2007)
After upgrading from openSUSE 10.2 to openSUSE 10.3 I got the error message New_Face failed. Maybe the font path is wrong. Please supply the text font file (~/.mplayer/subfont.ttf) when starting up MPlayer to watch video files. MPlayer would run fine and show the video and play sound ok, but the on screen display would fail to display anything; the subfont.ttf it was trying to find is what was used for the on screen display.
Install yum with rpm on CentOS
Posted October 16th, 2007 in Linux/Unix/BSD (Updated October 16th, 2007)
I set up a VPS (Virtual Private Server) with Net24 today with CentOS 5.0 i386 as the virtual server operating system. After logging in as root I discovered the operating system install was pretty minimal and didn't include yum for package management, so I had to manually install yum with rpm.
Nslookup: command not found error on CentOS 5
Posted October 17th, 2007 in Linux/Unix/BSD
I've just started using a VPS (Virtual Private Server) with CentOS 5.0 i386 as the virtual server operating system, but it has a pretty minimal operating system install. When I went to run the nslookup command to look up an IP address I got the error message nslookup: command not found.
Microsoft wireless mouse stopped working on Linux
Posted October 18th, 2007 in Hardware & Gadgets and Linux/Unix/BSD (Updated October 18th, 2007)
Yesterday while I was doing some work in Adobe Photoshop in a VMWare virtual machine on my Linux KDE desktop, my Microsoft Wireless Optical Mouse just suddenly stopped working for no apparent reason. At first I thought VMWare had done something funny with mouse capture so I jumped out of the virtual machine but it still wasn't working. Plugging a regular mouse with a cord into a USB port worked just fine, but the wireless mouse refused to work.
Querying the list of files contained in an RPM file
Posted October 19th, 2007 in Linux/Unix/BSD (Updated October 19th, 2007)
RPM is a package management tool created by RedHat for installing software packages, and can be used to query the files that will be installed by the RPM package file. You can query an RPM file that is on your local file system, or even a file that is on an FTP or HTTP server. The RPM file does not actually need to be installed on your system to be able to find out what it contains.
Installing maildrop on CentOS 5
Posted October 20th, 2007 in Email Servers and Linux/Unix/BSD
I have been in the process of migrating my websites from a couple of dedicated machines to a VPS (Virtual Private Server) which has a fairly minimal base install of CentOS 5 on it. My existing mailserver runs on Gentoo Linux, running Postfix, courier-imap, maildrop, Spamassassin and ClamAV, with the mail accounts and aliases handled by MySQL.
I would have liked to have run only packages available from the CentOS distribution (plus the addons etc) but neither courier-imap nor maildrop are available in the CentOS package trees. Instead I would need to use either cyrus-imapd or dovecot and maildrop was not available at all.
Yum sqlite database disk image is malformed error
Posted October 29th, 2007 in Linux/Unix/BSD
When trying to install something this morning using yum on a CentOS 5 machine, I got the error message "_sqlite.DatabaseError: database disk image is malformed". This article looks at how to fix the error.
SUSE Yast No such client module sw_single
Posted November 8th, 2007 in Linux/Unix/BSD (Updated November 24th, 2007)
After installing some software on openSUSE 10.3 using Yum this morning, which was much faster than using the Yast software installer, I went to install something else this evening and got the following error message when I clicked on the "Software Management" icon in Yast:
"Error loading language plugin /usr/lib64/YaST2/plugin/libpy2lang_perl.so: libboost_filesystem.so.1.33.1: cannot open shared object file: No such file or directory No such client module sw_single"
Fedora 8 is released - Gnome Live CD Screenshots
Posted November 9th, 2007 in Linux/Unix/BSD (Updated November 10th, 2007)
Fedora 8 has been released and contains a vast number of improvements new features, and a new theme known as Nodoka. Featured here are some screenshots from the Gnome Live CD.
A "Live CD" allows you to boot a Linux desktop directly from the CD without installing anything to your computer. This is useful for testing a Linux distribution out without harming your existing operating system. The Fedora Live CDs allow you to also install Fedora once booted into the desktop if you so choose, and can be purchase from Linux CD Mall
Fedora 8 is released - KDE Live CD Screenshots
Posted November 10th, 2007 in Linux/Unix/BSD
Fedora 8 has been released. Yesterday I showed a few screenshots of the Fedora 8 Gnome Live CD, and today we'll look at the Fedora 8 KDE Live CD with a few screenshots.
Changing the colour of the BASH shell prompt
Posted November 11th, 2007 in Linux/Unix/BSD
It's possible to change the contents and colour of the BASH shell prompt. My SSH sessions use a white background and I find the default [chris@localhost ~] style a little boring. I also find it useful to have the prompt green for ordinary user sessions, and red for root sessions so it's easy to see how much damage you can do by colour alone.
Switching SELinux off on CentOS 5
Posted November 13th, 2007 in Linux/Unix/BSD
Security-Enhanced Linux, also know as SELinux, implements various security policies on Linux and additional levels of access crontrol. It was originally developed by the U.S. National Security Agency to adhere to the "Orange Book" guidelines. On CentOS 5 it is enabled by default, but there may be circumstances where you don't need SELinux's additional security and may want to disable it.
PageUp and PageDown history search auto completion on the BASH shell
Posted November 14th, 2007 in Linux/Unix/BSD (Updated January 25th, 2008)
From the BASH shell it's possible to have auto-completion where you start to type in part of a command, and then use a keystroke sequence, such as PageUp or PageDown, to then cycle through the history for commands which started with the first text you have entered.
CUPS printing not working on MandrivaOne 2008.0
Posted November 16th, 2007 in Linux/Unix/BSD
I sell Linux on my Linux CD Mall website and one of my customers emailed me today with a problem he was having trying to use printers with the 32 bit Live Gnome CD version of MandrivaOne 2008.0. For some reason he was getting error messages when he tried to add a printer. I thought that possibly this was an issue with not being able to print from a live CD so thought I'd check it out and see if the problem would be fixed when I actually installed Mandriva.
Changing the hostname on CentOS
Posted November 17th, 2007 in Linux/Unix/BSD
If the hostname setting is incorrect on your CentOS/RedHat/Fedora machine, it's really easy to change the hostname from the command line. There are also GUI tools for doing this but we'll just look at the CLI tools for doing this.
VPS hostname reverted back to default value
Posted November 20th, 2007 in Linux/Unix/BSD
Last week I posted about how to change the hostname on CentOS. Running the hostname command worked nicely and did change the hostname, and restarting the postfix service meant it started using the new hostname. I then rebooted the VPS later on in the day, and unfortunately the hostname had defaulted back to the VPS default name, along the lines of vps347.foo.bar.example.com
C++ compiler cannot create executables on Ubuntu
Posted November 21st, 2007 in Linux/Unix/BSD
If you get the "C++ compiler cannot create executables" error message when trying to compile some software application on Ubuntu (or Kubuntu or Xubuntu or similar) then you need to install the "build-essential" packages.
Running all desktops on VMWare
Posted November 22nd, 2007 in Linux/Unix/BSD and VMWare
I have become increasingly dissatisfied with openSUSE, particularly since upgrading from 10.2 to 10.3 with a large number of breakages and general instability after the upgrade and am currently moving to a new setup with all my day to day desktop operating systems running as virtual machines in VMWare.
Install Yum on openSUSE with Yast
Posted November 23rd, 2007 in Linux/Unix/BSD (Updated November 24th, 2007)
openSUSE has an excellent system management tool called Yast, but the software package management tool in Yast is really slow to run. It is possible to install and use Yum instead on openSUSE and all of a sudden the slowness of running Yast's package management goes away. I have a pretty fast machine with a lot of memory, but it can take 5 to 10 minutes to open up the Yast software management application.
Yum error Metadata file does not match checksum
Posted November 27th, 2007 in Linux/Unix/BSD
When trying to install something on a CentOS 5 machine using Yum today, I got the error message "Metadata file does not match checksum" when Yum was trying to update the repository metadata. My first instinct was to run the error message through Google but the first couple of answers looked a little complex. I then remembered I'd had issues with Yum in an earlier post when I got the database disk image is malformed error message, so decided to try out the same solution before following the advice from the other sites.
History search auto completion on the BASH shell on Ubuntu
Posted November 28th, 2007 in Linux/Unix/BSD (Updated January 25th, 2008)
A few days ago I posted about enabling the PageUp and PageDown keys for history search auto completion in the BASH shell, looking at what needs to be done to configure it for CentOS 5. Now that I've just set up Kubuntu in a VMWare Virtual Machine as my primary Linux desktop, I needed to have the same thing working. I spend a fair amount of time doing stuff from the command line, and being able to search through the history in this way is very important to me.
Adding additional kicker applets with Kubuntu
Posted November 29th, 2007 in Linux/Unix/BSD
The default install of Kubuntu doesn't include useful kicker applets such as the system monitor, media player controller and so on. Fortunately it's very easy to add these with apt-get or using adept or a similar package management tool. Kicker is the taskbar that appears at the bottom (by default) of the screen on KDE, and contains things like the currently running applications, desktop switcher, K menu, system tray and clock.
Reset the Ctrl+Alt+Escape shortcut sequence to kill a window in KDE
Posted November 30th, 2007 in Linux/Unix/BSD
In X Windows, the Ctrl+Alt+Esc shortcut keystroke sequence allows you to kill a window. The cursor will normally turn into something like a crosshair, and the application window that you then click on will be killed. This is extremely useful for terminating a process that has died but the window is still there with a blank canvas.
In KDE you can change shortcut key sequences, including this useful kill window one. If you are like me, and you select the "Windows Scheme (With Win Key)" for the shortcut keys, then the Ctrl+Alt+Esc sequence will be disabled and you need to re-enable it yourself. The instructions below show how to re-enable this useful shortcut key sequence.
CentOS 5.1 is released
Posted December 2nd, 2007 in Linux/Unix/BSD
CentOS 5.1 was released today. It is based on the Red Hat Enterprise Linux release 5.1, and includes packages from all variants including Server and Client. All RHEL repositories have been combined into one, to make it easier for end users to work with. And the option to further enable external repositories at install time is now available in the installer.
Shell scripting using the date command
Posted December 7th, 2007 in Linux/Unix/BSD
A useful command line tool is date, which is typically used for displaying the current system date, or setting it. The default format of the date and time displayed will be the system default, eg "Fri Dec 7 16:41:08 NZDT 2007", but it is possible to apply your own formatting, and also to specify a different date to use, without adjusting the system clock.
MD5SUM errors with CentOS 4.6 when creating CDs and DVDs
Posted December 22nd, 2007 in Linux/Unix/BSD
When I downloaded the CentOS 4.6 ISO images they checksummed fine using MD5 checksums. When I burn them to CD or DVD the checkums of the disc itself do not match the actual MD5s. I have noticed this behaviour before with the CentOS 3.x and 4.x branch.
CentOS 4.6 faulty ISO images
Posted December 23rd, 2007 in Linux/Unix/BSD
I sell CentOS on my Linux CD Mall website, and CentOS 4.6 was released recently as an update to the 4.x branch of CentOS (and based on the Red Hat Enterprise Linux 4.6 release of a couple of weeks before). After CentOS 4.6 was released, I downloaded the CD and DVD ISO images as usual, but shortly after was notified by the CentOS mailing list that the images on the mirrors were faulty:
Using find to locate files modified in the last 24 hours etc
Posted December 28th, 2007 in Linux/Unix/BSD
The Unix/Linux shell command "find" is really useful for finding files on your computer. There are also graphical utilities for finding files, but sometimes it is easier to use the command line, or it's simply not possible, eg if logged in to a remote server using SSH. This post looks at how to use the find utility to locate files based on the modification time eg looking for files that have been modified in the last 24 hours.
Host operating system reinstall
Posted January 3rd, 2008 in Linux/Unix/BSD and VMWare
I currently run VMWare Workstation on my desktop computer, using the Linux host operating system to mainly just run the VMWare sessions; I run two main desktop environments (Linux and Windows XP) and one development webserver (CentOS) in Virtual Machines. Just over a month ago I was using SUSE Linux as my main desktop computer, and just using a Windows XP virtual machine, but after upgrading from 10.2 to 10.3 things started to go wrong so I changed to running my desktops on VMWare instead, with a fresh install of Kubuntu 7.10 as my primary Linux desktop / virtual machine.
How to mount an ISO image on Linux
Posted January 10th, 2008 in Linux/Unix/BSD (Updated February 19th, 2008)
An ISO image or .iso file contains the disk image of an ISO 9660 file system, which is used for storing data on CD-ROMs and DVD-ROMs. It is possible to take an ISO image and record it onto a CD or DVD using various applications for doing so, and it is also possible to mount the ISO image using Linux, so that you can access the files without having to actually burn it to disk first.
Mount reiserfs partitions on CentOS 4
Posted January 11th, 2008 in Linux/Unix/BSD
I needed to copy some files from an old hard drive to a machine I have running CentOS 4, but the partition on the hard drive I needed to access was formatted with the reiserfs file system. The Linux kernel in CentOS 4 does not include support for reiserfs so you need to install a new kernel from the CentOS Plus repository. By doing this, the kernel is no longer the same as that provided by Red Hat's Enterprise Linux, but you will be able to mount ReiserFS volumes.
SUSE Error libpopt.so.0()(64bit) is needed by rpm-4.4.2-140.x86_64
Posted January 13th, 2008 in Linux/Unix/BSD
I received the following email from Soren Banke the other day regarding my blog post SUSE Yast No such client module sw_single, which had instructions about how to fix that error:
"I followed your very nice instruction how to get the RPM back in action, mine also died (under suse 10.3).
I found the rpm-4.4.2-140.x86_64, and wanted to install, but suse then tells it needs the libpopt.so.0
error: Failed dependencies:
libpopt.so.0()(64bit) is needed by rpm-4.4.2-140.x86_64
I checked if it was there, and it tells that package popt-1.7-368 is already installed, so I guess it is okay?
Now I am a bit out of ideas?"
How to mount an ISO image on FreeBSD
Posted January 15th, 2008 in Linux/Unix/BSD
A few years ago I posted about howto mount an ISO image with FreeBSD when I was hosting my websites on a FreeBSD 4.11 box. However the method for mounting an ISO image changed in later releases, as advised to me in an email by Leif Neland. Today I was emailed by Rollin Kibbe with instructions about how to mount ISO images with FreeBSD 6.2 so have decided to post them here (and I also recently posted about how to mount ISO images with Linux).
redhat-lsb-3.0-8.EL conflicts with file from package...
Posted February 2nd, 2008 in Linux/Unix/BSD
While setting up a test virtual machine using CentOS 4 to do development for a Red Hat Enterprise Linux 4 production server, I ran 'yum update' and then 'yum groupinstall "Development Tools"' and got the following error message:
Transaction Check Error: file /usr/share/man/man1/lsb_release.1.gz from install of redhat-lsb-3.0-8.EL conflicts with file from package redhat-lsb-3.0-8.EL
Dynamic MMap ran out of room error on Debian
Posted February 5th, 2008 in Linux/Unix/BSD
A few days ago I was wanting to install some new software onto a Debian 3 box that I have inherited the support for. After running "apt-get install dhcp-client" I got the error message "Reading Package Lists... Error! E: Dynamic MMap ran out of room".
Getting Transaction Check Error with Yum
Posted February 7th, 2008 in Linux/Unix/BSD
I needed to install the MSSQL libraries for PHP on a CentOS 5 server and ran into a few issues when installing some of the required dependencies, getting "Transaction Check Error" error messages which indicated conflicts between files in packages.
openSUSE Complains it "Cannot Find Repository" when installing
Posted February 8th, 2008 in Linux/Unix/BSD
A customer of mine from the Linux CD Mall emailed with a problem trying to install openSUSE 10.3. The DVD booted up OK but then came up with the error message "Cannot Find Repository" and refused to be able to install. Basically it couldn't see the DVD even though it had booted from it in the first place.
Format a partition with the ext3 filesystem
Posted February 12th, 2008 in Linux/Unix/BSD
The ext3 filesystem is a Linux filesystem with journalling capabilities. I'm always forgetting the command I need to run to format a partitition with the ext3 file system so have posted this article so I always have a easy to find reference for it... The example used here is done on the command line, and not using a GUI tool.
Saving a file downloaded with wget with a different name
Posted February 14th, 2008 in Linux/Unix/BSD
wget is a command line utility for downloading files from FTP and HTTP web servers. By default when you download a file with wget, the file will be written to the current directory, with the same name as the filename in the URL. However, it is possible to save the downloaded file with a different filename using wget.
SSH server security through obscurity
Posted February 15th, 2008 in Linux/Unix/BSD
The openSSH server allows you to connect to a remote server (eg a Linux or BSD machine) in a terminal session and run command line applications etc. By default SSH servers listen on port 22 and this is the source for a number of brute force attacks as people try to log into remote servers to do nasty stuff. There are a number of methods for securing SSH better (eg firewalling out access to only a limited set of hosts, using RSA/DSA keys and so on) but we'll look at those another time. This post is about "security through obscurity" where we configure the SSH server to listen on a different port than port 22.
Changing the default text editor on Linux
Posted February 16th, 2008 in Linux/Unix/BSD
The default command line text editor on Linux (and BSD varaiants) determines what is used when you run commands such as "crontab -e" and is often not what you want to use yourself. Typcially vi/vim is the default text editor; many people prefer emacs or other editors, and I prefer to use nano myself.
md5sum: only one argument may be specified when using --check
Posted February 20th, 2008 in Linux/Unix/BSD
I burn CDs and DVDs for my Linux CD Mall website on a CentOS 4 machine and use md5sum checksums to ensure that the ISO images have downloaded correctly from the http or ftp server or via bittorrent. I store each ISO files's md5sum in a separate .md5 file and use the md5sum command's -c flag to check the contents are valid.
Saving time and bandwidth by creating a DVD image from CD ISO files
Posted February 21st, 2008 in Linux/Unix/BSD
A little while back I did something stupid and deleted a lot of files from a hard drive array, including a few hundred Linux and BSD CD and DVD ISO images. I had a large number of these archived to disc and have been able to re-download most of the other stuff I need easily enough, but there's always the challenge to download the replacements as quickly as possible and using as little bandwidth as possible (bandwidth is still pretty expensive here in New Zealand).
In the case of a distribution like CentOS, each release comes on a number of CDs or alternatively a single DVD. The contents of each are fairly similar, and there are a number of mirrors around the world which support downloading using rsync, as well as the more standard ftp and http methods.
It suddenly struck me one day that I should be able to simply concatenate the contents of the CDs into one great big file, and then rsync it against an rsync server. It will contain a fair amount of start and end stuff not on the DVD, but assuming the contents are in a relatively similar order on the discs then the amount needed to download to make the DVD image correct should be less than having to download the whole thing.
Public key not installed error when installing from Dag RPM Repository
Posted February 26th, 2008 in Linux/Unix/BSD
The Dag RPM Repository contains a collection of RPM packages for Red Hat Enterprise Linux, CentOS, Fedora and others which are not included in the base installation/libraries for those Linux distributions. If you get an error message similar to the one shown below when attempting to install an RPM package from the Dag RPM Repository, then you need to install the Dag GPG keys:
warning: rpmts_HdrFromFdno: V3 DSA signature: NOKEY, key ID 6b8d79e6 Public key for jigdo-0.7.3-1.el4.rf.i386.rpm is not installed
How to install jigdo on CentOS and RHEL
Posted February 27th, 2008 in Linux/Unix/BSD
I create CDs and DVDs for my Linux CD Mall website on a CentOS 4 machine, and create the new ISO images for Debian using jigdo. This is the first of several posts which will look at jigdo, and looks at how to install jigdo on CentOS and Red Hat Enterprise Linux, because the necessary package is not included in the default software repositories.
How to use jigdo-lite
Posted February 29th, 2008 in Linux/Unix/BSD
jigdo is a method of downloading CD and DVD images over the Internet (and other large files) and is used by Debian and Ubuntu when new releases are created. jigdo files contain a list of the files that need to be included in the new CD or DVD ISO image and you can get the files from local sources and over the Internet. This means when you want to create ISO images for updated versions of Debian, you only need to download the changed files. This saves both bandwidth and and time. This post looks at how to use the jigdo-lite command line tool to create a new DVD ISO image for the most recent Debian 4.0r3 release.
Slax 6.0.2 Released
Posted March 4th, 2008 in Linux/Unix/BSD
Slax 6.0.2 was released on March 3rd 2008 as a bugfix update to the Slax 6.0 branch; the original Slax 6.0 release was on February 11th 2008. You can buy Slax from the Linux CD Mall and I have also posted screenshots of Slax 6.0.2 at the Linux CD Mall today.
SUSE Linux 10.2 DVD Differing MD5SUMS
Posted March 5th, 2008 in Linux/Unix/BSD
A couple of days ago I needed to download the SUSE Linux 10.2 i386 DVD. This is an older release now but one of my customers needed it. I had the md5sum on file and was surprised after downloading it that it didn't checksum. I then used rsync to check the file against what was on two different mirrors and it still didn't checksum correctly. I then download the MD5SUMS file from one of the mirrors and discovered the md5 checksums in the file on the mirror were different from what I had on file.
Checksums do not match, image might be corrupted error with jigdo
Posted March 6th, 2008 in Linux/Unix/BSD
After creating the 2nd DVD ISO image for Debian 4.0r3 amd64, I got the error message "ERROR: Checksums do not match, image might be corrupted!" I didn't see the point in running jigdo-lite again as it would presumably cause the same issue, so instead used rsync to synchronise the full ISO file against one on an rsync mirror. This post looks at the error messages and the rsync command and output used.
Unknown partition table error
Posted March 7th, 2008 in Linux/Unix/BSD
After re-partitioning a hard drive by removing all existing partitions and creating a single primary parition which takes up the entire disk, I formatted it as ext3, mounted it at /mnt/hdh and copied all the ISO images across from the exsting ISO drive. I rebooted, pausing to swap the disk over to a different cable, and got the error message "hdb: unknown partition table".
Create CDs from a DVD with jigdo
Posted March 11th, 2008 in Linux/Unix/BSD
jigdo allows you to create new ISO images from a jigdo file and template file, and files from your local filesystem, a CD/DVD and/or from remote sources. If you have a DVD image for the current release of Debian, for example, you can then create CD images from this using jigdo without having to download anything other than the jigdo and template files. This can be useful if you already have a DVD or DVD ISO image and need to install Debian onto a machine that only has a CD-ROM.
Checking daylight savings settings on Linux
Posted March 13th, 2008 in Linux/Unix/BSD
The date daylight savings starts and ends changed in New Zealand last year, but unfortunately there was only a few months between when the decision was made and when it happened and the updates to the timezone databases on various Linux distributions wasn't done in time in many cases. This affected many servers and services which displayed the wrong time for the couple of weeks between when daylight savings actually started and when it would have in previous years.
Daylight savings is about to end in New Zealand this year on April 6th, whereas it would have ended this weekend on March 16th. Not wanting to have issues with my web servers like I did when daylight savings started, I decided I'd better check the setting are correct on all the servers I manage.
Create multiple ISO images with jigo-lite
Posted March 18th, 2008 in Linux/Unix/BSD
Jigdo is a tool for creating ISO images from a jigdo and template file, and files from multiple sources including previous release CDs or DVDs and FTP. I've written a few posts about jigdo now and this one looks at how to create multiple ISO images in one hit using the jigdo-lite command line tool. The example uses the recent Debian 4.0r3 i386 release.
Knoppix 5.3.1 Screenshots
Posted April 2nd, 2008 in Linux/Unix/BSD
Knoppix 5.3.1 was released on March 28th 2008, and is the first Knoppix release since January 2007. You can buy Knoppix 5.3.1 from the Linux CD Mall and I have also posted screenshots of Knoppix 5.3.1 at the Linux CD Mall today.
genisoimage/mkisofs "Incorrectly encoded string" error
Posted April 4th, 2008 in Linux/Unix/BSD
While creating some ISO images for backup purposes earlier this week, I got the error message "Incorrectly encoded string" and "Possibly creating an invalid Joliet extension" when using genisoimage/mkisofs to create the image.
Modifying the Linux Grub boot loader's options
Posted April 5th, 2008 in Linux/Unix/BSD
One of my Linux CD Mall customers emailed me the other day with a Linux annoyance: "The computer always booted into Linux by default if I wasn't quick enough to stop it. Most annoying. I would have preferred the computer to wait until I told it where to boot but could not find a way of doing that. All of the Linux distros that I tried just take over without being asked." This post looks at how you can change the grub boot loader's settings to solve this issue using a text editor. And I agree with him, it is annoying how the boot loader is often set up by default to boot into Linux too quickly.
Zenwalk Linux Live 5.0 Screenshots
Posted April 9th, 2008 in Linux/Unix/BSD
Zenwalk Live 5.0 was released on March 25th 2008, following the Zenwalk 5.0 release of January 8th 2008. Zenwalk's default desktop environment is based on Xfce, which is now at version 4.4.2 and can be seen in the Zenwalk Live screenshot thumbnails shown below. I have posted Zenwalk Live screenshots on the Linux CD Mall today and you can view the full sized screenshots there.
Directory listings slow with ftp server and CentOS
Posted April 23rd, 2008 in Linux/Unix/BSD
I recently installed the VSFtpd FTP Server onto a CentOS box and have a fairly tight firewall setup script using iptables. When I logged in to test it and issued an "ls -l" command it took a really long time for the driectory listing to come back. At first I thought it wasn't going to show the directory listing at all but it finally did. This post looks at the solution to the problem.
Ubuntu 8.04 Released
Posted April 25th, 2008 in Linux/Unix/BSD
Ubuntu 8.04 was released on Thursday 24th of April 2008, which is today (Friday) New Zealand time, along with the related projects: Kubuntu, Xubuntu, Edubuntu and Ubuntu Studio. Ubuntu is probably the world's most popular Linux distribution and each six monthly release is eagerly anticipated. You can buy Ubuntu and the others from my Linux CD Mall website. Thanks to offering it up for pre-order earlier in the week, it has skyrocketed up my "Most Popular" list for April, in 2nd place after Knoppix.
Reverse Mapping Checking - Possible Break-in Attempt Error with SSH
Posted May 2nd, 2008 in Linux/Unix/BSD
When you connect to a host using SSH or SFTP it does a series of checks to ensure you are connecting to the host you are expecting to connect to. One of these is a reverse lookup on the IP address to check the hostname is the same as the hostname you are connecting to. If it's not, you'll get an error message like "reverse mapping checking getaddrinfo for ... POSSIBLE BREAK-IN ATTEMPT!". The post looks at a solution to this message.
Stop logwatch reporting on a particular service on CentOS
Posted May 3rd, 2008 in Linux/Unix/BSD
logwatch is a system log analyzer and reporter which emails daily reports about information in the system log files in /log. On CentOS and Red Hat Enterprise Linux this is usually configured by default to email the root user on a daily basis with the results from the log analysis. This post looks at how to stop logwatch from reporting on a particular service, for example sendmail and postfix.
logwatch "postdrop Illegal seek" and "sendmail queue file write error"
Posted May 4th, 2008 in Email Servers and Linux/Unix/BSD
logwatch is a daily process for reporting and analyzing log files and I recently started getting errors on one of the CentOS Linux machines I manage and no daily report. The particular machine gets thousands of bounced emails per day and the mail log files get very large. logwatch had been reporting to me every single bounced email message so the report emails had got very large before stopping altogether. This post looks at the error messages I got and what I did to fix the problem.
Change download mirror for Fedora when using jigdo
Posted May 13th, 2008 in Linux/Unix/BSD
With the release of Fedora 9 I have discovered that Fedora CD and DVD ISO images can be updated using jigdo like Debian and Ubuntu can. (I have posted about jigdo in the past, including how to use jigdo-lite, create CDs from a DVD with jigdo, and create multiple ISO images with jigo-lite). When creating the new images, the Fedora jigdo settings use download.fedoraproject.org to get the files; this server automatically redirects you to a geo-targeted local mirror. If for some reason you need to specify a particular server, or a local repository instead, it is possible by editing the .jigdo file. This post looks at how to do this.
Fedora 9 Released
Posted May 14th, 2008 in Linux/Unix/BSD
Fedora 9 was released on May 13th 2008. You can buy Fedora 9 from the Linux CD Mall and this post highlights some of the changes and features of Fedora 9.
File failed to download with Fedora jigdo - completed with rsync
Posted May 15th, 2008 in Linux/Unix/BSD
Fedora 9 was released this week and I created my CD and DVD ISO images using jigdo. When creating the x86_64 DVD image jigdo failed to download one file named "Fedora-9-comps.xml" and couldn't complete the creation og the DVD ISO file so I resorted to using rsync to finish the job off. This post looks at the error message and the solution I used.
Delete a file starting with a dash/hypen on Linux on the command line
Posted July 6th, 2008 in Linux/Unix/BSD
So you have a file that starts with a dash/hyphen/- and need to delete it. But when you try to do so, the "rm" command complains that you have passed an "invalid option --". This post looks at the simple solution to deleting a file that starts with a dash/hyphen.
Switch off sound notifications in Fedora 9 KDE
Posted July 15th, 2008 in Linux/Unix/BSD
After installing the KDE 4 edition of Fedora 9 into a VMWare Server virtual machine, I kept getting "audio playback device PulseAudio does not work". There was no sound device installed into this virtual machine so I would have expected Fedora to be clever enough to not bother with sound notifications but no, it persisted and I would sometimes see two to three of these messages stacked up as phonon falls back from one to the other. This post looks at how to switch off sound notifications on KDE 4 on Fedora 9.
How to enable mouse wheel scrolling in Kubuntu under VMWare
Posted July 18th, 2008 in Linux/Unix/BSD and VMWare
I've just set up a new VMWare virtual machine with Kubuntu 8.04 and the scroll wheel on my mouse didn't work. The steps to correct this are pretty simple and are covered in this post. This should work for any Ubuntu/Kubuntu variant when running in VMWare.
