1MCOOKIE(1)                       User Commands                      MCOOKIE(1)
2
3
4

NAME

6       mcookie - generate magic cookies for xauth
7

SYNOPSIS

9       mcookie [options]
10

DESCRIPTION

12       mcookie generates a 128-bit random hexadecimal number for use with the
13       X authority system. Typical usage:
14
15          xauth add :0 . mcookie
16
17       The "random" number generated is actually the MD5 message digest of
18       random information coming from one of the sources getrandom(2) system
19       call, /dev/urandom, /dev/random, or the libc pseudo-random functions,
20       in this preference order. See also the option --file.
21

OPTIONS

23       -f, --file file
24           Use this file as an additional source of randomness (for example
25           /dev/urandom). When file is '-', characters are read from standard
26           input.
27
28       -m, --max-size number
29           Read from file only this number of bytes. This option is meant to
30           be used when reading additional randomness from a file or device.
31
32           The number argument may be followed by the multiplicative suffixes
33           KiB=1024, MiB=1024*1024, and so on for GiB, TiB, PiB, EiB, ZiB and
34           YiB (the "iB" is optional, e.g., "K" has the same meaning as "KiB")
35           or the suffixes KB=1000, MB=1000*1000, and so on for GB, TB, PB,
36           EB, ZB and YB.
37
38       -v, --verbose
39           Inform where randomness originated, with amount of entropy read
40           from each source.
41
42       -V, --version
43           Display version information and exit.
44
45       -h, --help
46           Display help text and exit.
47

FILES

49       /dev/urandom
50
51       /dev/random
52

BUGS

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

SEE ALSO

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

REPORTING BUGS

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

AVAILABILITY

64       The mcookie command is part of the util-linux package which can be
65       downloaded from Linux Kernel Archive
66       <https://www.kernel.org/pub/linux/utils/util-linux/>.
67
68
69
70util-linux 2.37.2                 2021-06-02                        MCOOKIE(1)
Impressum