Category Archives: Linux

Reinstalled server

I had to reinstall my server, and unfortunately the latest Ubuntu LTS gave me a hard time. I wanted to use LVM for the disks, but the 14.04 LTS version seems to have some bugs related to this, so I had to resort to plain partitions. All right, I’ll be using KVM for virtualizing different servers, so space usage is pretty much all disk dedicated as data storage for KVM. But then KVM is having issues with apparmor, so in hindsight I should probably just have resorted to Debian…

Posted in Linux | Tagged | Leave a comment

KDE desktop field codes

This is a compilation of desktop field codes I use in KDE. There are more field codes, but they are deprecated and shouldn’t be used. This compilation was found on the Freedesktop homepage, and the following quote is their description of field codes:

A number of special field codes have been defined which will be expanded by the file manager or program launcher when encountered in the command line. Field codes consist of the percentage character (“%”) followed by an alpha character. Literal percentage characters must be escaped as %%. Deprecated field codes should be removed from the command line and ignored. Field codes are expanded only once, the string that is used to replace the field code should not be checked for field codes itself.
Posted in Linux | Tagged , , , , , , , , , , , , , | Leave a comment

munin: File is not a perl storable

The problem

I recently got me a bunch of mails from cron, informing me about a failure

File is not a perl storable at /usr/lib/perl/5.18/Storable.pm line 398, at /usr/share/perl5/Munin/Master/Utils.pm line 279.

Most of the graphs (but not all graphs) for a host was not displaying correctly. Instead of the graph I saw the actual data.

Not really finding any relevant answers to my querys on Google, I found this page. Not exactly the same error, but I did find some valuable information about how to further investigate the problem.

The solution

Run munin-cron as user munin to see if displays anymore information about the problem:

Posted in Linux | Tagged , , , , | Leave a comment

NFS: does not map into domain ‘localdomain’

I stumbled on a strange problem regarding NFS, which I hadn’t used for a while on my server. I had some old exports which worked last time I used them, but not any more. I was doing an rsync and suddenly saw messages about chgrp or chmod failing. These messages are expected when uid/gid is not matching between server and client, so what’s up?

Running dmesg showed me messages like these:

NFS: v4 server warhammer does not accept raw uid/gids. Reenabling the idmapper.

Looking in /var/log/syslog I saw messages like these:

rpc.idmapd nss_getpwnam: name ... does not map into domain 'localdomain'

I finally found a working solution here.

Posted in Linux | Tagged , , , , , , | Leave a comment

Nagios/Icinga: could not stat() command file

Problem:

Trying to add a comment to a service results in an error message shown in the web interface:

Could not stat() command file

Solution:

Enable External Commands in nagios.cfg / icinga.cfg:

check_external_commands=1

 

Update permissions in a way that survive package upgrades:

service icinga stop
dpkg-statoverride --update --add nagios www-data 2710 /var/lib/icinga/rw
dpkg-statoverride --update --add nagios nagios 751 /var/lib/icinga
service icinga start
Posted in Linux | Tagged , , , , | Leave a comment

Using smartmontools to test a Motorola VIP1963 disk

Background

As seen in my previous post, I’ve been having problems with some harddrives in my workstation. I’ve also had some problems with my TV’s digital box, a Motorola VIP1963.

At first there was some trouble with time-shift not working, but this could be resolved by simply rebooting the device. This wasn’t really worth noting because this device is constantly on and never rebooted, so I guess it was bound to happen sooner or later.

Troubleshooting

Suddenly the other day, the device rebooted on it’s own, and when it came back up it gave me an error message saying that the harddrive could not be found. This message was in swedish:

Posted in Linux | Tagged , , , , , , , , , , , , , , , , , , , | 2 Comments

Reinstalling my workstation

Disclaimer

THIS IS NOT A BEST PRACTICE ON HOW TO INSTALL A LINUX BOX!
This document serves as a reminder to myself, on what needs to be done when reinstalling my workstation, and I have put it here to have it conveniently at hand. Because of this, the document may not be of any help to anybody but me. The last month I’ve had 3 failing harddrives, one new and 2 used ones, so this makes me want to document the process, at least in an overall fashion…

Installing dependencies

  • I have a script listing all my script dependencies and all software I always want installed, so this part is easy:
Posted in Linux | Tagged , , , , , , , , , , , , , , , , , , , , , , , , | 1 Comment

Sudo NOPASSWD not working

Here is a quick reminder for sudo and non-working NOPASSWD statements.

 When multiple entries match for a user, they are applied in order.
 Where there are multiple matches, the last match is used (which is
 not necessarily the most specific match).

This means that more specific entries like this should be put towards the end of the file:

username ALL = NOPASSWD: /usr/bin/dbus-send
username ALL = NOPASSWD: /usr/sbin/pm-suspend
username ALL = NOPASSWD: /usr/sbin/pm-hibernate

 

Posted in Linux | Tagged , , , , , , , | Leave a comment

Installing Net ID in Firefox

Telia have patched a security hole in their Net ID software so I decided to download the new version and try to install it.

I’ve never managed to get Net ID working in Linux, due to Telia only supporting Ubuntu 10.04 and a very old version of Firefox. For this embarassing reason (for Telia), I have been forced to use a virtual machine with Windows XP whenever I had to identify myself…

With the latest software update I was hoping that they would have corrected the previous problems. I downloaded the file iidsetup_64.tar.gz with the x64 version and after extracting it I installed it as root:

Posted in Linux | Tagged , , , , , , , , | 2 Comments

Choosing default editor

For some reason my editor ofchoice (vim) reverted back to the default editor of nano on my server. The command for setting the default editor is:

sudo update-alternatives --config editor

Hopefully the setting will stick this time.

 

Posted in Linux | Tagged , , , , , | Leave a comment