Top Nav

Archive | Reliable Penguin

Linux and open-source solutions.

Fix Completion In Shell On Ubuntu

Sometimes with a new user on Ubuntu I find that filename auto-completion is missing in the shell. I found two issues that cause this:

1. Ubuntu sets new users to /bin/sh which is a very limited shell. So first step is to change the user to /bin/bash:

2. The /etc/bash.bashrc has filename completion disabled by default. Edit this file and un-comment the appropriate lines. Here’s what it looked like on one server:

So I changed to:

Upon login the new user should now have filename completion features.

Also note that by default “vi” is handicapped. Here’s how to upgrade to a full feature set:

http://blogs.reliablepenguin.com/2013/10/25/fix-vi-ubuntu

0

Fix vi On Ubuntu

Some times I’ll run into an Ubuntu install where “vi” does not work as expected. For example the backspace and arrow keys will in insert mode will add characters. Turns out Ubuntu installs vim-tiny by default which is a stripped down (and historically compatible) version of vi. The solution is just to install the full version:

1

AIDE

AIDE or Advanced Intrusion Detection Environment is a great tool for host based system integrity monitoring. AIDE will maintain a database of checksums on the content and attributes of critical system files. If these files change then a notification email will be sent.

Here’s the homepage for the AIDE project: http://aide.sourceforge.net/

Installing AIDE is easy since it’s available via yum:

Edit the configuration file at /etc/aide.conf and make the following changes:

  1. Change “verbose” from 5 to 0.
  2. Change rule for “/var/log/lastlog” from “LSPP” to “LOG”

To setup just do:

Also add a daily cronjob that runs a check operation:

This job will send notification email to “root”. Make sure “root” is aliased to an appropriate address so the notifications will actually be received.

The procedure when you receive a notification should be to:

  1. Review the changed files and confirm that the changes are legitimate.
  2. Update the aide database to reflect the new content/properties.

Here’s the update procedure:

If you don’t update the database then you’ll keep getting the same notifications over and over.

0