]> git.ipfire.org Git - thirdparty/util-linux.git/blob - misc-utils/mcookie.1
Manual pages: order NOTES / HISTORY / BUGS / EXAMPLE consistently
[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 "December 2014" "util-linux" "User Commands"
4 .SH NAME
5 mcookie \- generate magic cookies for xauth
6 .SH SYNOPSIS
7 .B mcookie
8 [options]
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 .sp
14 .RS
15 .B xauth add :0 . `mcookie`
16 .RE
17 .PP
18 The "random" number generated is actually the MD5 message
19 digest of random information coming from one of the sources
20 .IR getrandom ()
21 system call,
22 .IR /dev/urandom ,
23 .IR /dev/random ,
24 or the
25 .IR "libc pseudo-random functions" ,
26 in this preference order. See also the option \fB\-\-file\fR.
27 .SH OPTIONS
28 .TP
29 .BR \-f , " \-\-file " \fIfile
30 Use this \fIfile\fR as an additional source of randomness (for example /dev/urandom).
31 When \fIfile\fR is '-', characters are read from standard input.
32 .TP
33 .BR \-m , " \-\-max\-size " \fInumber
34 Read from \fIfile\fR only this \fInumber\fR of bytes.
35 This option is meant to be used when reading additional
36 randomness from a file or device.
37 .IP
38 The
39 .I number
40 argument may be followed by the multiplicative suffixes KiB=1024,
41 MiB=1024*1024, and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is
42 optional, e.g., "K" has the same meaning as "KiB") or the suffixes
43 KB=1000, MB=1000*1000, and so on for GB, TB, PB, EB, ZB and YB.
44 .TP
45 .BR \-v , " \-\-verbose"
46 Inform where randomness originated, with amount of entropy read from each
47 source.
48 .TP
49 .BR \-V , " \-\-version"
50 Display version information and exit.
51 .TP
52 .BR \-h , " \-\-help"
53 Display help text and exit.
54 .SH FILES
55 .I /dev/urandom
56 .br
57 .I /dev/random
58 .SH BUGS
59 It is assumed that none of the randomness sources will block.
60 .SH SEE ALSO
61 .BR md5sum (1),
62 .BR X (7),
63 .BR xauth (1),
64 .BR rand (3)
65 .SH AVAILABILITY
66 The mcookie command is part of the util-linux package and is available from
67 .UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
68 Linux Kernel Archive
69 .UE .