MUNGED(8)

🌸 NAME 🌸

okay bestie, welcome to munged(8) β€” this is the MUNGE daemon, straight out of the MUNGE Uid 'N' Gid Emporium. yes that is the real name of the thing, we don't make the rules, we just vibe with them πŸ’…


✨ SYNOPSIS ✨

munged [OPTION]...

πŸ¦‹ DESCRIPTION πŸ¦‹

so. the munged daemon is the main character here πŸ‘‘ β€” its whole job is authenticating local MUNGE clients and servicing their credential encode & decode requests. it's basically the bouncer, the bartender, and the group chat admin all at once.

every single munged daemon inside one security realm shares a common key. and every host in that realm is expected to have common users/UIDs and groups/GIDs β€” like, everybody has to be on the same page, no cap. that key is what cryptographically protects the credentials, and it's created with the mungekey command. πŸ—οΈ

when a credential gets created, munged embeds metadata inside it β€” including the effective UID and GID of the requesting client (as determined by munged, not by whatever the client claims, tyvm) and the current time (as determined by the local clock). then it does the whole glow-up routine: compresses the data, computes a message authentication code, encrypts the data, and base64-encodes the result before handing the credential back to the client. it's giving ✨cryptographic skincare routine✨.

when a credential gets validated, munged runs through the checks in order:

  1. first it checks the message authentication code to make sure the credential hasn't been subsequently altered. (tamper check, periodt.)
  2. next it checks the embedded UID/GID restrictions to figure out whether the requesting client is even allowed to decode it.
  3. then it checks the embedded encode time against the current time β€” if that difference exceeds the embedded time-to-live, the credential has expired, sorry babe 😭.
  4. finally it checks whether this credential has been previously decoded on this host β€” if so, it's been replayed. not today, satan.
  5. if all checks pass, the credential metadata and payload get returned to the client. πŸŽ‰

πŸ’… OPTIONS πŸ’…

  • -h, --help β€” shows you a summary of the command-line options. the "wait what does this thing do" button.
  • -L, --license β€” displays license information. legal era.
  • -V, --version β€” displays version information. for when you gotta know which build you're on.
  • -f, --force β€” forces the daemon to run if at all possible. this overrides warnings for an existing local domain socket, a lack of entropy for the PRNG, and insecure file/directory permissions. > ⚠️ use with caution, bestie β€” overriding these warnings can affect security. this is the "I know better" flag and sometimes you do NOT know better.
  • -F, --foreground β€” runs the daemon in the foreground. no hiding, no backgrounding, just vibes in your terminal.
  • -M, --mlockall β€” locks pages into memory so the daemon can't get swapped to disk. this can prevent authentication delays under extreme memory pressure. it requires sufficient memory lock limits. see the MEMORY LOCKING section below πŸ‘‡
  • -s, --stop β€” stops the daemon bound to the socket and waits for it to shut down. use it with the --socket option to target a daemon bound to a non-default socket location. this option exits with a zero status if the specified daemon was successfully stopped, or a non-zero status otherwise. politely asking it to leave the party.
  • -S, --socket path β€” specifies the local domain socket for communicating with clients. the hangout spot.
  • -v, --verbose β€” be verbose. yap mode: enabled.
  • --auth-server-dir directory β€” specifies an alternate directory in which the daemon will create the pipe used to authenticate clients. the recommended permissions for this directory are 0711. this option is only valid on platforms where client authentication is performed via a file-descriptor passing mechanism.
  • --auth-client-dir directory β€” specifies an alternate directory in which clients will create the file used to authenticate themselves to the daemon. the recommended permissions for this directory are 1733. this option is only valid on platforms where client authentication is performed via a file-descriptor passing mechanism.
  • --benchmark β€” disables recurring timers in order to reduce some noise while benchmarking. this affects the PRNG entropy pool, supplementary group mapping, and credential replay hash. > 🚨 do not enable this option when running in production. benchmark mode is not a lifestyle.
  • --group-check-mtime boolean β€” specifies whether the modification time of /etc/group should be checked before updating the supplementary group membership mapping. if this value is non-zero, the check will be enabled and the mapping will not be updated unless the file has been modified since the last update.
  • --group-update-time seconds β€” specifies the number of seconds between updates to the supplementary group membership mapping; this mapping is used when restricting credentials by GID. a value of 0 causes it to be computed initially but never updated (unless triggered by a SIGHUP). a value of -1 causes it to be disabled.
  • --key-file path β€” specifies an alternate pathname to the key file. πŸ—οΈ
  • --listen-backlog integer β€” specifies the socket's listen backlog limit; note that the kernel may impose a lower limit. a value of 0 uses the software default. a value of -1 specifies SOMAXCONN, the maximum listen backlog queue length defined in <sys/socket.h>.
  • --log-file path β€” specifies an alternate pathname to the log file.
  • --max-ttl integer β€” specifies the maximum time-to-live (in seconds) for credentials. this value caps the TTL during both encoding and decoding. the hard-coded upper bound is 3600 seconds (1 hour); the default is 3600. reducing this value will limit the maximum retention time for replay cache entries, which is viable if clocks within the MUNGE realm can be kept in sync with minimal skew.
  • --num-threads integer β€” specifies the number of threads to spawn for processing credential requests. more threads, more hands on deck 🫢
  • --origin address β€” specifies the origin address that will be encoded into credential metadata. this can be a hostname or IPv4 address; it can also be the name of a local network interface, in which case the first IPv4 address found assigned to that interface will be used. the default value is the IPv4 address of the hostname returned by gethostname(). failure to resolve the address will result in an error; if overridden, the origin will be set to the null address.
  • --pid-file path β€” specifies an alternate pathname for storing the Process ID of the daemon.
  • --seed-file path β€” specifies an alternate pathname to the PRNG seed file.
  • --syslog β€” redirects log messages to syslog when the daemon is running in the background.
  • --trusted-group group β€” specifies the group name or GID of the "trusted group". this is used for permission checks on a directory hierarchy. directories with group write permissions are allowed if they are owned by the trusted group (or the sticky bit is set).

🧠 MEMORY LOCKING 🧠

the --mlockall option locks pages into memory to prevent swapping under memory pressure.

memory usage scales with the number of worker threads, size of the user and group databases (when supplementary group mapping is enabled), and the rate of credential decoding (which grows the replay cache). so like, it grows. be aware.

many systems default to an insufficient memory lock limit. a minimum of 16 MB is required for basic operation; 64-256 MB is recommended for typical configurations. increase it in one of the following ways:

🐧 systemd-based systems

create /etc/systemd/system/munge.service.d/memlock.conf:

[Service]
LimitMEMLOCK=256M

then reload and restart:

systemctl daemon-reload
systemctl restart munge.service

πŸ” PAM limits

add to /etc/security/limits.conf (values in KB):

munge  soft  memlock  262144
munge  hard  memlock  262144
⚠️ on systemd-based systems, PAM limits are ignored for services. use the systemd configuration instead. do not skip this, bestie, it will not work and you will be sad.

🐚 Shell environment (for testing)

set the limit before starting munged (value in KB):

ulimit -l 262144
munged --mlockall

πŸ”’ Security Considerations

the replay cache is unbounded and grows with credential decode rate. replay entries are retained until credentials expire based on their time-to-live (TTL). credentials have a default TTL of 5 minutes; clients can specify up to the maximum TTL configured on the encoding munged (1 hour by default, configurable via --max-ttl). during decoding, the credential's TTL is capped at the decoding munged's maximum TTL. when --mlockall is specified, replay entries are locked in physical memory.

on systems with untrusted local users, an attacker could encode credentials with the maximum TTL (1 hour by default) and decode them repeatedly to fill the replay cache. once the memory lock limit is reached, munged will likely terminate when attempting to allocate additional memory, causing a denial of service. 😭 this is the scary part, pay attention.

🚨 use this option only on trusted systems where local users are controlled, or set the memory lock limit to a reasonable upper bound rather than unlimited. monitor munged's locked memory usage on high-volume systems to ensure the limit is not approached during normal operation. reducing --max-ttl can limit replay cache growth but requires tight clock synchronization.

πŸ“‘ SIGNALS πŸ“‘

  • SIGHUP β€” immediately update the supplementary group membership mapping instead of waiting for the next scheduled update; this mapping is used when restricting credentials by GID.
  • SIGTERM β€” terminate the daemon. bye bestie πŸ‘‹

πŸ“ NOTES πŸ“

all clocks within a security realm must be kept in sync within the credential time-to-live setting. clock drift is not cute.

while munged prevents a given credential from being decoded on a particular host more than once, nothing prevents a credential from being decoded on multiple hosts within the security realm before it expires. so like, one-time-per-host, not one-time-globally. iykyk.


πŸ‘‘ AUTHOR πŸ‘‘

Chris Dunlap <cdunlap@llnl.gov>


Copyright (C) 2007-2025 Lawrence Livermore National Security, LLC. Copyright (C) 2002-2007 The Regents of the University of California.

MUNGE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Additionally for the MUNGE library (libmunge), you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.


🫢 SEE ALSO 🫢

munge(1), remunge(1), unmunge(1), munge(3), munge_ctx(3), munge_enum(3), munge(7), mungekey(8).

https://github.com/dun/munge


and that's the whole page, bestie πŸ’– this was munged(8) from the MUNGE Uid 'N' Gid Emporium, page version munge-0.5.18, dated 2026-02-10. go forth and munge responsibly, mwah πŸ’‹

πŸ“¦ where this page comes from