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() 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 stan‐
26              dard input.
27
28       -m, --max-size number
29              Read  from file only this number of bytes.  This option is meant
30              to be used when reading additional randomness  from  a  file  or
31              device.
32
33              The  number  argument may be followed by the multiplicative suf‐
34              fixes KiB=1024, MiB=1024*1024, and so on for GiB, TiB, PiB, EiB,
35              ZiB  and YiB (the "iB" is optional, e.g., "K" has the same mean‐
36              ing as "KiB") or the suffixes KB=1000, MB=1000*1000, and  so  on
37              for GB, TB, PB, EB, ZB and YB.
38
39       -v, --verbose
40              Inform  where randomness originated, with amount of entropy read
41              from each source.
42
43       -V, --version
44              Display version information and exit.
45
46       -h, --help
47              Display help text and exit.
48

BUGS

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

FILES

53       /dev/urandom
54       /dev/random
55

SEE ALSO

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

AVAILABILITY

60       The mcookie command is part of the util-linux package and is  available
61       from Linux Kernel Archive ⟨https://www.kernel.org/pub/linux/utils/util-
62       linux/⟩.
63
64
65
66util-linux                       December 2014                      MCOOKIE(1)
Impressum