Upload Tizen:Base source
[framework/base/util-linux-ng.git] / misc-utils / mcookie.1
1 .\" mcookie.1 --
2 .\" Public Domain 1995 Rickard E. Faith (faith@cs.unc.edu)
3 .TH MCOOKIE 1 "25 September 1995" "" "Linux Programmer's Manual"
4 .SH NAME
5 mcookie \- generate magic cookies for xauth
6 .SH SYNOPSIS
7 .B mcookie
8 .RB [ \-v ]
9 .RB [ \-f
10 .IR filename ]
11 .SH DESCRIPTION
12 .B mcookie
13 generates a 128-bit random hexadecimal number for use with the X authority
14 system.  Typical usage:
15 .RS
16 xauth add :0 . `mcookie`
17 .RE
18 .PP
19 The "random" number generated is actually the output of the MD5 message
20 digest fed with various pieces of random information: the current time, the
21 process id, the parent process id, the contents of an input file (if
22 .B \-f
23 is specified), and several bytes of information from the first of the
24 following devices which is present:
25 .IR /dev/random ,
26 .IR /dev/urandom ,
27 files in
28 .IR /proc ,
29 .IR /dev/audio .
30 .SH BUGS
31 The entropy in the generated 128-bit is probably quite small (and,
32 therefore, vulnerable to attack) unless a non-pseudorandom number generator
33 is used (e.g.,
34 .I /dev/random
35 under Linux).
36 .PP
37 It is assumed that none of the devices opened will block.
38 .SH FILES
39 .I /dev/random
40 .br
41 .I /dev/urandom
42 .br
43 .I /dev/audio
44 .br
45 .I /proc/stat
46 .br
47 .I /proc/loadavg
48 .SH "SEE ALSO"
49 .BR X (1),
50 .BR xauth (1),
51 .BR md5sum (1)
52 .SH AVAILABILITY
53 The mcookie command is part of the util-linux-ng package and is available from
54 ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.