]> git.ipfire.org Git - thirdparty/util-linux.git/blob - misc-utils/mcookie.1
e7579c4b9dcc3a789718baad3071ff605785ce05
[thirdparty/util-linux.git] / misc-utils / mcookie.1
1 .\" mcookie.1 --
2 .\" Public Domain 1995 Rickard E. Faith (faith@cs.unc.edu)
3 .TH MCOOKIE 1 "June 2011" "util-linux" "User Commands"
4 .SH NAME
5 mcookie \- generate magic cookies for xauth
6 .SH SYNOPSIS
7 .B mcookie
8 [\fIoptions\fR]
9 .SH DESCRIPTION
10 .B mcookie
11 generates a 128-bit random hexadecimal number for use with the X authority
12 system. Typical usage:
13 .RS
14 xauth add :0 . `mcookie`
15 .RE
16 .PP
17 The "random" number generated is actually the output of the MD5 message
18 digest fed with various pieces of random information: the current time, the
19 process id, the parent process id, and optionally the contents of an input
20 file. and several bytes of information from the first of the following
21 devices which is present:
22 .IR /dev/random ,
23 .IR /dev/urandom ,
24 files in
25 .IR /proc ,
26 .IR /dev/audio .
27 .SH OPTIONS
28 .TP
29 \fB\-f\fR, \fB\-\-file\fR=\fIFILE\fR
30 Use file as a macig cookie seed. When file is defined as `-' character
31 input is read from stdin.
32 .TP
33 \fB\-v\fR, \fB\-\-verbose\fR
34 Explain what is being done.
35 .TP
36 \fB\-V\fR, \fB\-\-version\fR
37 Output version information and exit.
38 .TP
39 \fB\-h\fR, \fB\-\-help\fR
40 Display this help and exit.
41 .SH BUGS
42 The entropy in the generated 128-bit is probably quite small (and,
43 therefore, vulnerable to attack) unless a non-pseudorandom number generator
44 is used (e.g.,
45 .I /dev/random
46 under Linux).
47 .PP
48 It is assumed that none of the devices opened will block.
49 .SH FILES
50 .I /dev/random
51 .br
52 .I /dev/urandom
53 .br
54 .I /dev/audio
55 .br
56 .I /proc/stat
57 .br
58 .I /proc/loadavg
59 .SH "SEE ALSO"
60 .BR X (1),
61 .BR xauth (1),
62 .BR md5sum (1)
63 .SH AVAILABILITY
64 The mcookie command is part of the util-linux package and is available from
65 ftp://ftp.kernel.org/pub/linux/utils/util-linux/.