Schlagwort-Archive: linux

nfs4: Fix for the nobody nogroup problem

The problem

When using nfs4 and a freshly installed Linux system it can happen that you run in the situation that all files and directories have no owner and group:

drwxr-xr-x 4 nobody nogroup 4096 Okt 26 17:10 tmp
-rw-r--r-- 1 nobody nogroup 83 Okt 23 00:50 todo
-rw-r--r-- 1 nobody nogroup 97 Okt 23 00:09 todo~

This is because NFS4 needs the id mapping demon idmapd and also a correct config for it.

The solution

Change in /etc/default/nfs-common the line




and also in /etc/idmapd.conf the parameter Domain to a domain name that needs to be the same in all idmapd.conf configs you’re actually using:

Domain = localdomain

That’s it, restart nfsd and it should work.

X11: Replacing numeric keypad key comma with more usable dot


The numeric keypad is a big help when typing long numers or entering mathematical formulas. Especially the command line utility ‚bc‘ is much powerful in combination with the keypad.

The problem

Unfortunately there are two worlds, even in mathematics: The dot world and the comma world. In germany, the decimal separator is a comma, so an excerpt of PI would be written as 3,14159265358979323846. In the english world it’s a dot, so PI would read as 3.14159265358979323846.
The dot on the numeric keypad is on german keyboards very often mapped to a comma. This is an annoyance when dealing with english-world tools like ‚bc‘.


There are some solutions to the problem:

  • patch programs to also accept localized decimal separators
  • remap the comma-key to dot on the numeric keypad

The following shows how to remap the comma-key on the numeric keypad on a Debian Etch based system.

Creating a new XKB variant

If you’re using the german keyboard layout, you probably use the nodeadkeys variant so you have a more practical behaviour for certain keys. I’ll show how to modify an existing nodeadkeys mapping that changes the numeric keypad behaviour. First of all, open an editor and edit your keymap file, for germans this is /usr/share/X11/xkb/symbols/de. Copy the nodeadkeys section and give it a new name:

xkb_symbols "nodeadkeys-stfu" {
// modify the basic German layout to not have any dead keys
include "de(basic)"
 name[Group1]="Germany - Eliminate dead keys";
key <TLDE>  { [asciicircum,    degree,      notsign,      notsign ] };
 key <AE12>  { [     acute,      grave,      cedilla,      cedilla ] };
 key <AD11>  { [udiaeresis, Udiaeresis,    diaeresis,    diaeresis ] };
 key <AD12>  { [      plus,   asterisk,   asciitilde,       macron ] };
 key <AC10>  { [odiaeresis, Odiaeresis,  doubleacute,  doubleacute ] };
 key <AC11>  { [adiaeresis, Adiaeresis,  asciicircum,  asciicircum ] };
 key <BKSL>  { [numbersign, apostrophe,        grave,        grave ] };
 key <AB10>  { [     minus, underscore, dead_belowdot,    abovedot ] };

Now comes the interesting part. Just add the line include „keypad(dot)“ before the closing curly brace, and store the file.
You can edit your /etc/X11/xorg.conf file to use this new XKB variant permanently, or you can try your change using the command setxkbmap de nodeadkeys-stfu temporarily.


Changing the UUID of a hard disk image in VirtualBox


VirtualBox is a virtual machine software that can run a couple of operating systems. A virtual machine is usually using a disk image instead of a real hard disk. A common operation is copying disk images in a clone-like manner. Unfortunately copying images with the command line cp command won’t work: VirtualBox will tell you it already knows this disk images UUID.


There’s a very easy solution for this problem that is not so obvious. You can change a disk images UUID using the sethduuid command of the virtual box management command. It’s important that you specify the absolute path to the disk image, otherwise you’ll get a cryptic error message and the command will fail. Example:

~$   VBoxManage internalcommands sethduuid /home/fury/Blah.vdi
 Oracle VM VirtualBox Command Line Management Interface Version 3.2.6
 (C) 2005-2010 Oracle Corporation
 All rights reserved.
UUID changed to: 364cf332-f11b-43f6-9f6c-498f3d259073
~$   VBoxManage internalcommands sethduuid /home/fury/Blah.vdi
 Oracle VM VirtualBox Command Line Management Interface Version 3.2.6
 (C) 2005-2010 Oracle Corporation
 All rights reserved.
UUID changed to: 3d4d6145-82f2-40a2-b2f7-44567661d33f

As you can see the command above just sets the disks UUID to a new random value that is probably not used.

Final words

Please also be aware that there’s an official approach using

VBoxManage clonehd /path/infile /path/outfile