logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mcookie - generate magic cookies for xauth

Availability

       The mcookie command is part of the util-linux package which can be downloaded from Linux Kernel Archive
       <https://www.kernel.org/pub/linux/utils/util-linux/>.

util-linux 2.40.2                                  2024-04-24                                         MCOOKIE(1)

Bugs

       It is assumed that none of the randomness sources will block.

Description

mcookie generates a 128-bit random hexadecimal number for use with the X authority system. Typical usage:

          xauthadd:0. mcookie

       The "random" number generated is actually the MD5 message digest of random information coming from one of
       the sources getrandom(2) system call, /dev/urandom, /dev/random, or the libcpseudo-randomfunctions, in
       this preference order. See also the option --file.

Files

/dev/urandom/dev/random

Name

       mcookie - generate magic cookies for xauth

Options

-f, --filefile
           Use this file as an additional source of randomness (for example /dev/urandom). When file is '-',
           characters are read from standard input.

       -m, --max-sizenumber
           Read from file only this number of bytes. This option is meant to be used when reading additional
           randomness from a file or device.

           The number argument may be followed by the multiplicative suffixes KiB=1024, MiB=1024*1024, and so on
           for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB")
           or the suffixes KB=1000, MB=1000*1000, and so on for GB, TB, PB, EB, ZB and YB.

       -v, --verbose
           Inform where randomness originated, with amount of entropy read from each source.

       -h, --help
           Display help text and exit.

       -V, --version
           Print version and exit.

Reporting Bugs

       For bug reports, use the issue tracker at https://github.com/util-linux/util-linux/issues.

See Also

md5sum(1), X(7), xauth(1), rand(3)

Synopsis

mcookie [options]

See Also