Syndicate content

Unix

An Operating System that works. All the specifications are free and Linux, AIX, HP-UX, SunOS, Solaris, IRIX are examples of a Unix implementation.

Attacks by ZmEu or w00tw00t robots

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.

Error trying to upgrade software on an Ubuntu system

Today I got a really strange error. Part of the message was:

E: Encountered a section with no Package: header
E: Problem with MergeList /var/lib/apt/lists/<some name>
E: The package lists or status file could not be parsed or opened.

That seemed really bizarre. I had never seen such an error before...

So I searched for it and one thing to know is that the files under that directory are temporary, so you can actually delete them. apt-get knows how to regenerate them.

So in other words you can do something like this:

sudo rm /var/lib/apt/lists/<some file>
# or ...

Why are my Ubuntu/Debian computer upgrades so slow?

I get a set of upgrades, about once a day these days (the Ubuntu and other Open Source developers are keeping way too busy!)

Because of that, I run the software updater. That takes time, generally. But why is that?

After various upgrades from one OS version to another, possibly from the start, I dunno exactly when it broke, but the autoremove feature stopped uninstalling the old kernels.

In itself, it is not so bad, you just get additional kernels under /boot. It can be come a problem if you have a small /boot partition, but otherwise, it is not a big problem in itself.

Until you upgrade!

Boot into the command line console in Ubuntu 16.04

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).

systemd has a list of variables you can tweak using the systemctl command. To boot in ...

Remove the Keyboard Repeat in a VirtualBox console running Linux?

When I use virtualbox over the network (from a headless computer) and I connect using SSH, that virtualbox is going to be slow.

Somehow, I did not have that problem with older versions (Ubuntu 14.04 and older) but newer versions have required me to turn off keyboard repetition otherwise I get keys repeated (mainly the Enter key when something takes processing time at the time I hit the enter key) as in:

Heeeeeelllllooooo

The solution is to run the folloing command:

setterm -repeat off

It works in most terminals, for sure, the regular Linux console you get after installing a server in a ...

Old Synergy 64bit version for windows compatible with Ubuntu synergy package version 1.4.12

As I like to have Synergy working on my Windows boxes (i.e. laptops), I am saving a copy of the installer 64 bit version which works fine with WinXP and Win7. I'm about to test it with Win10 which is likely to accept it as is too. Just in case you did not know, Synergy is a driver that takes one mouse device and makes it work on multiple computers. In other words, you can use any number of computers with one mouse and one keyboard. Move the mouse to the right computer and you can use the keyboard on that computer. No need for a KVM anymore (Keyboard Video Mouse device that allowed you to ...

How to setup a Linux firewall

Introduction

If you setup a Linux box, you want to setup a firewall before you connect your computer to the Internet. If you are setting up a remote server, it should only have the SSH port open. Connect to it, setup the fire, then only install the other servers and open ports as required (and only ports that need to be connected from the outside.)

Any port that you open without the firewall already setup is at risk. You may want to install PHP and along will come a database which may open a port to the Internet. Something that you just don't want to happen.

Setup Firewall

To ...

Turning sites and modules on and off in Apache2

I always have to looks for the command line option to turn sites and modules on and off (really it is said to be enabled or disabled.)

The commands are as follow:

  • a2ensite -- enable one site
  • a2dissite -- disable one site
  • a2enmod -- enable one module
  • a2dismod -- disable one module

When you use one of the commands in the command line terminal without specifying which site or module to enable, then you are given a list of the sites or modules you can enable or disable. Note that the configuration files have to end with .conf for this mechanism to work as expected.

How do you get micro-seconds from the Linux stat(2) call?

A little while ago I noticed that I couldn't find documentation on how to get the modification time of a file in micro-seconds. The notorious stat() call returns st_mtime defined as a time_t in the documentation.

Well... The fact is that the structure is really composed of a timeval structure and not a time_t (that applies to all 3 time values: modification, last access, and last status change.) So in fact you can use the name of the field without the last letter and a sub-timeval field as in:

struct stat s;
seconds = s.st_mtim.tv_sec; // == s.st_mtime
microseconds = ...

Lost SSH key graphical prompt and auto-add to SSH agent

At some point in the past, my system somehow lost the ability to avoid asking me for my key every time I connect to one of my servers. It generally okay, I don't do so much work on that server that I'd have to connect all the time...

However, it is annoying when, once in while, I end up doing a lot of work, back and forth.

The ssh-agent was installed and working. I could add the key manually:

ssh-add ~/.ssh/my-secret-key
ssh-add -l

The ssh-add command allows you to add and remove keys from the ssh-agent. The -l command line option lists the keys currently held by the agent.

...

Syndicate content Syndicate content