1MCOOKIE(1) User Commands MCOOKIE(1)
2
3
4
6 mcookie - generate magic cookies for xauth
7
9 mcookie [options]
10
12 mcookie generates a 128-bit random hexadecimal number for use with the
13 X authority system. Typical usage:
14 xauth add :0 . `mcookie`
15
16 The "random" number generated is actually the output of the MD5 message
17 digest fed with various pieces of random information: the current time,
18 the process id, the parent process id, and optionally the contents of
19 an input file. and several bytes of information from the first of the
20 following devices which is present: /dev/random, /dev/urandom, files in
21 /proc, /dev/audio.
22
24 -f, --file=FILE
25 Use file as a macig cookie seed. When file is defined as `-'
26 character input is read from stdin.
27
28 -v, --verbose
29 Explain what is being done.
30
31 -V, --version
32 Output version information and exit.
33
34 -h, --help
35 Display this help and exit.
36
38 The entropy in the generated 128-bit is probably quite small (and,
39 therefore, vulnerable to attack) unless a non-pseudorandom number gen‐
40 erator is used (e.g., /dev/random under Linux).
41
42 It is assumed that none of the devices opened will block.
43
45 /dev/random
46 /dev/urandom
47 /dev/audio
48 /proc/stat
49 /proc/loadavg
50
52 X(1), xauth(1), md5sum(1)
53
55 The mcookie command is part of the util-linux package and is available
56 from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
57
58
59
60util-linux June 2011 MCOOKIE(1)