The Linux Page

Help other users realize that everything is possible, especially avoiding Windows for their own personal use.

Welcome to The Linux Page


Fox Trot by Bill Amend. Click to enlarge.
Click to enlarge

This site is a collection of my own work with Linux. Certain things are easy, others take time to decipher and if I ever need to repeat the work (which usually happens!), then I need to remember everything by memory or... have a site with all the steps taken and to take again.

The following are my most recent posts:

Who is ZmEu?

An image showing ZmeuThe name Zmeu (no capital E) is the name of a fantastic creature of Romania. There are so many stories that there isn't a clear understanding of what it is... but it is human like, can spit fire and wants to marry young women.

If you're wondering, it is generally a bad guy.

ZmEu Attack

Today, I noticed a lot of traffic on one of my servers. Looking into what was happening, I immediately found out that an attacker was looking for a loophole in that system. That attack was being performed from China.

I checked another server, and sure enough, that other server was ...

Lock you emails down by encrypting them properly with an SSL certificate.

Getting a Signed Certificate

In order to have TLS support for Postfix you need to setup several files.

First of all, you create a certificate and get it signed by GoDaddy. They have instructions for that purpose. At this time, it looks something like this:

openssl req -new -newkey rsa:2048 -nodes \
            -keyout domain.key -out domain.csr

The names "domain.key/csr" should match your domain name. If you are signing a specific sub-domain, you may want to include that sub-domain in the filename (i.e. mail.domain.key.)

When GoDaddy returns to you, they will give you a ...

Synchronizing your old close with the worlds best time keepers... and your computer's fallback clock.

I think I noticed that error before but did not pay close attention to it since my NTP just worked.

The fact is that something changed a while back (the new PPS API was accepted in 2000) and the fudge command was not updated accordingly. Either that, or the setup was always wrong?

The old /etc/conf/ntpd setup file included a line like this:

fudge   127.0.0.1     stratum 10

which is wrong because the local clock is not consider to be part of 127.0.0.1. I've never changed that IP address because I rarely look at the ntpd logs and since I did today, I noticed that error.

The correct ...

Changing the name of your computer (especially if it's Hal, that's dangerous!)

Ubuntu 16.04 and older

Changing your computer hostname used to be really easy:

sudo vim /etc/hostname

Change the name there and reboot.

If you reference the hostname in /etc/hosts, you also want to update that there and any other settings (such as tripwire).

The fact is that worked great in older versions. Change the name in that file, reboot and voilà the new name was the current name. The reboot is important because otherwise some of your services may not catch the modification. Yes. You can do:

hostname <new-name>

and it works as expected (i.e. try to log out ...

CPU frequencies as I run one large compression.

I noticed that the Linux Kernel allows for CPU frequencies to vary. But I could not really see any CPU running at a speed other than 800MHz when looking at /proc/cpuinfo so I thought that they were "stuck" there.

Looking a little further, I found a question with a good answer on Unix & Linux. You can use /proc/cpuinfo alright, but you've got to look at it constantly otherwise it will not look like it changes. That is, the change is so temporary, it happens so fast, that you really have to track that quickly otherwise you'll miss it.

Here is a command we can readily ...

Twin Windows — perfect duplication

Since I'm moving to a new server, I need to copy all of Gb or Gb of data from my old computer to the new one. This is mainly three folders:

/home
/mnt/cvs
/var/www

There are two main problems here:

1. the files have various permissions and ownership which I do not want to lose, especially for websites and the cvs repositories (I still have a CVS, but that folder also include SVN and GIT repositories)

2. the files on the source computer require various permissions to be read, "namely", I have to be root to make sure I can read all those files...

In many cases, to copy ...

Spider Web representing various Internet and Intranet network of users.

Older Versions (Ubuntu 17.10-)

With older versions I would just go to /etc/network and edit the interfaces file.

This file would have definitions about the computer interfaces, whether each computer gets a static IP or uses DHCP, etc.

Here is a sample setup for older versions:

auto eth0
iface eth0 inet static
        address 10.0.0.1
        netmask 255.0.0.0
        network 10.0.0.0
        broadcast 10.255.255.255
        gateway 10.0.0.1
        dns-nameservers 10.0.0.8 10.0.0.9
        dns-search m2osw.com
        pre-up /etc/network/firewall

The pre-up is a script run ...

A hill of sparsely distributed trees.

Introduction

As I'm doing some work to create an RDBM like library to write data to a database, I wanted to make sure that my file was NOT sparse. I don't mind sparse files at all, they save us some space on disk. Only, when creating a database, pretty much all my blocks of data will need to exist, otherwise we may take the risk of not being able to allocate the inodes later and write in those blocks.

So I search Google to try to find information on NOT to create a sparse file. Make sure that my software prevents the OS from creating a sparse file. I could not really find ...

A modern tunnel.

Running X Tool from a Remote Connection

I have been using SSH to connect to my LAN network computers and make all sorts of changes to the machines running in a console and X tools. Works just fine.

Setup the SSH Tunnel

I actually setup the X11 capability with two changes:

1) setup the SSH server with:

X11Forwarding yes
X11DisplayOffset 10

Then restart the SSH server.

2) setup your client with a ~/.ssh/config file where you enter:

Host remote
  ForwardX11 yes

This is the equivalent to the -X command line option, without you having to remember to enter the ...

An Ubuntu 16.04 login prompt just after boot, ready for you to log in.

As I just upgraded my 14.04 installation to 16.04, it booted right up to lightdm.

I had it properly setup to boot in a console before, but somehow it changed the behavior on me.

This is because the computer is now using systemd to boot.

I already had the GRUB variables setup as expected:

GRUB_CMDLINE_LINUX_DEFAULT="text"
GRUB_CMDLINE_LINUX="text"
GRUB_TERMINAL=console

But this is not enough if you want to start in the console when running systemd (which is running since 15.04). See X11 Auto-starting for details about older versions.

systemd has a list of ...

Thank you for visiting my website.