1MCOOKIE(1)                 Linux Programmer's Manual                MCOOKIE(1)
2
3
4

NAME

6       mcookie - generate magic cookies for xauth
7

SYNOPSIS

9       mcookie [-v] [-f filename]
10

DESCRIPTION

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, the contents of  an  input  file
19       (if  -f  is specified), and several bytes of information from the first
20       of the following devices which is present:  /dev/random,  /dev/urandom,
21       files in /proc, /dev/audio.
22

BUGS

24       The  entropy  in  the  generated  128-bit is probably quite small (and,
25       therefore, vulnerable to attack) unless a non-pseudorandom number  gen‐
26       erator is used (e.g., /dev/random under Linux).
27
28       It is assumed that none of the devices opened will block.
29

FILES

31       /dev/random
32       /dev/urandom
33       /dev/audio
34       /proc/stat
35       /proc/loadavg
36

SEE ALSO

38       X(1), xauth(1), md5sum(1)
39

AVAILABILITY

41       The  mcookie command is part of the util-linux-ng package and is avail‐
42       able from ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.
43
44
45
46                               25 September 1995                    MCOOKIE(1)
Impressum