table of contents
MCOOKIE(1) | User Commands | MCOOKIE(1) |
NAME¶
mcookie - generate magic cookies for xauth
SYNOPSIS¶
mcookie [options]
DESCRIPTION¶
mcookie generates a 128-bit random hexadecimal number for use with the X authority system. Typical usage:
xauth add :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 libc pseudo-random functions, in this preference order. See also the option --file.
OPTIONS¶
-f, --file file
-m, --max-size number
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
-V, --version
-h, --help
FILES¶
/dev/urandom
/dev/random
BUGS¶
It is assumed that none of the randomness sources will block.
SEE ALSO¶
REPORTING BUGS¶
For bug reports, use the issue tracker at <https://github.com/karelzak/util-linux/issues>.
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/>.
2022-02-14 | util-linux 2.37.4 |