MUNGE Installation Guide


Installing the Software

MUNGE requires either the Libgcrypt or OpenSSL cryptographic library. Libgcrypt is licensed under the LGPL, whereas OpenSSL is licensed under dual original-BSD-style licenses. On some systems, the OpenSSL license is incompatible with the GPL license used by MUNGE. While Libgcrypt offers a more compatible license, OpenSSL offers better performance. The selection of the cryptographic library can be specified at build time with the configure script's --with-crypto-lib option.

MUNGE includes bzip2 and zlib compression support if these libraries are found when the software is built.

MUNGE can be installed using one of the following methods:

Securing the Installation

On most platforms, the munged daemon does not require root privileges. If possible, you should run the daemon as a non-privileged user. This can be controlled by the init script as detailed in the Starting the Daemon section below.

By default, the munged daemon uses the following system directories:

These directories must be owned by the user that the munged daemon will run as. They cannot allow write permissions for group or other (unless the sticky-bit is set). In addition, all of their parent directories in the path on up to the root directory must be owned by either root or the user that the munged daemon will run as. None of them can allow write permissions for group or other (unless the sticky-bit is set).

Creating a Secret Key

A security realm encompasses a group of hosts having common users and groups. It is defined by a shared cryptographic key. Credentials are valid only within a security realm. All munged daemons within a security realm must possess the same secret key.

By default, the secret key resides in "/etc/munge/munge.key". This location can be overridden on the munged command-line or via the init script as detailed in the Starting the Daemon section below.

You can create a secret key using a variety of methods:

This file should be permissioned 0400 and owned by the user that the munged daemon will run as. Securely propagate this file (e.g., via ssh) to all other hosts within the same security realm.

Starting the Daemon

On each host within the security realm, invoke the daemon directly (/usr/sbin/munged) or use the init script (/etc/init.d/munge start). The init script sources /etc/default/munge (found on Debian-based systems) and /etc/sysconfig/munge (found on RedHat-based systems), if present, to set variables recognized by the script.

The OPTIONS variable passes additional command-line options to the daemon; for example, this can be used to override the location of the secret key (--key-file) or set the number of worker threads (--num-threads). If the init script is invoked by root, the USER variable causes the daemon to execute under the specified username; the "daemon" user is used by default.

Testing the Installation

The following steps can be performed to verify that the software has been properly installed and configured:

If you encounter problems, check if the munged daemon is running (/etc/init.d/munge status). Also, check the logfile (/var/log/munge/munged.log) or try running the daemon in the foreground (/usr/sbin/munged --foreground). Some error conditions can be overridden by forcing the daemon (/usr/sbin/munged --force).

Using MUNGE

Applications written in C/C++ can use the interface provided by <libmunge.h>. Scripts can invoke the /usr/bin/munge and /usr/bin/unmunge executables — specify "-h" or "--help" for usage information, or Read The Fine Manpages.


$Date: 2007-07-17 06:41:42 +0200 (Tue, 17 Jul 2007) $ MUNGE Home