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:
- first it checks the message authentication code to make sure the credential hasn't been subsequently altered. (tamper check, periodt.)
- next it checks the embedded UID/GID restrictions to figure out whether the requesting client is even allowed to decode it.
- 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 π.
- finally it checks whether this credential has been previously decoded on this host β if so, it's been replayed. not today, satan.
- 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--socketoption 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,--socketpath β specifies the local domain socket for communicating with clients. the hangout spot.-v,--verboseβ be verbose. yap mode: enabled.--auth-server-dirdirectory β specifies an alternate directory in which the daemon will create the pipe used to authenticate clients. the recommended permissions for this directory are0711. this option is only valid on platforms where client authentication is performed via a file-descriptor passing mechanism.--auth-client-dirdirectory β specifies an alternate directory in which clients will create the file used to authenticate themselves to the daemon. the recommended permissions for this directory are1733. 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-mtimeboolean β specifies whether the modification time of/etc/groupshould 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-timeseconds β specifies the number of seconds between updates to the supplementary group membership mapping; this mapping is used when restricting credentials by GID. a value of0causes it to be computed initially but never updated (unless triggered by aSIGHUP). a value of-1causes it to be disabled.--key-filepath β specifies an alternate pathname to the key file. ποΈ--listen-backloginteger β specifies the socket's listen backlog limit; note that the kernel may impose a lower limit. a value of0uses the software default. a value of-1specifiesSOMAXCONN, the maximum listen backlog queue length defined in<sys/socket.h>.--log-filepath β specifies an alternate pathname to the log file.--max-ttlinteger β 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 is3600seconds (1 hour); the default is3600. 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-threadsinteger β specifies the number of threads to spawn for processing credential requests. more threads, more hands on deck π«Ά--originaddress β 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 bygethostname(). failure to resolve the address will result in an error; if overridden, the origin will be set to the null address.--pid-filepath β specifies an alternate pathname for storing the Process ID of the daemon.--seed-filepath β specifies an alternate pathname to the PRNG seed file.--syslogβ redirects log messages to syslog when the daemon is running in the background.--trusted-groupgroup β 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. monitormunged's locked memory usage on high-volume systems to ensure the limit is not approached during normal operation. reducing--max-ttlcan 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 π
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).
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
- arch rolling: munge 0.5.18-2 Β· GPL-3.0-or-later AND LGPL-3.0-or-later
- fedora 43: munge 0.5.18-1.fc43 Β· GPL-3.0-or-later AND LGPL-3.0-or-later
- fedora 44: munge 0.5.18-1.fc44 Β· GPL-3.0-or-later AND LGPL-3.0-or-later
- nixpkgs unstable: munge 0.5.18
- Copyright (C) 2007-2025 Lawrence Livermore National Security, LLC
- Copyright (C) 2002-2007 The Regents of the University of California
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms