]> git.ipfire.org Git - thirdparty/util-linux.git/blame - misc-utils/mcookie.1
hardlink: fix bad formatting in hardlink.1
[thirdparty/util-linux.git] / misc-utils / mcookie.1
CommitLineData
894aa2f2 1.\" mcookie.1 --
6dbe3af9 2.\" Public Domain 1995 Rickard E. Faith (faith@cs.unc.edu)
7ab71099 3.TH MCOOKIE 1 "December 2014" "util-linux" "User Commands"
6dbe3af9
KZ
4.SH NAME
5mcookie \- generate magic cookies for xauth
6.SH SYNOPSIS
894aa2f2 7.B mcookie
f49ccec2 8[options]
6dbe3af9
KZ
9.SH DESCRIPTION
10.B mcookie
11generates a 128-bit random hexadecimal number for use with the X authority
12system. Typical usage:
7ab71099 13.sp
6dbe3af9 14.RS
7ab71099 15.B xauth add :0 . `mcookie`
6dbe3af9 16.RE
726f69e2 17.PP
7ab71099
BS
18The "random" number generated is actually the MD5 message
19digest of random information coming from one of the sources
3fe5e8ec 20.IR getrandom ()
655776a2 21system call,
5c36a0eb 22.IR /dev/urandom ,
0720d60c 23.IR /dev/random ,
7ab71099
BS
24or the
25.IR "libc pseudo-random functions" ,
655776a2 26in this preference order. See also the option \fB\-\-file\fR.
177f48fa
SK
27.SH OPTIONS
28.TP
7ab71099 29.BR \-f , " \-\-file " \fIfile
655776a2 30Use this \fIfile\fR as an additional source of randomness (for example /dev/urandom).
7ab71099 31When \fIfile\fR is '-', characters are read from standard input.
177f48fa 32.TP
7ab71099
BS
33.BR \-m , " \-\-max\-size " \fInumber
34Read from \fIfile\fR only this \fInumber\fR of bytes.
35This option is meant to be used when reading additional
36randomness from a file or device.
f7bac573
SK
37.IP
38The
39.I number
40argument may be followed by the multiplicative suffixes KiB=1024,
41MiB=1024*1024, and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is
42optional, e.g., "K" has the same meaning as "KiB") or the suffixes
43KB=1000, MB=1000*1000, and so on for GB, TB, PB, EB, ZB and YB.
44.TP
7ab71099 45.BR \-v , " \-\-verbose"
0720d60c
SK
46Inform where randomness originated, with amount of entropy read from each
47source.
177f48fa 48.TP
7ab71099 49.BR \-V , " \-\-version"
b4362b6f 50Display version information and exit.
177f48fa 51.TP
7ab71099 52.BR \-h , " \-\-help"
b4362b6f 53Display help text and exit.
726f69e2 54.SH BUGS
0720d60c 55It is assumed that none of the randomness sources will block.
726f69e2 56.SH FILES
726f69e2
KZ
57.I /dev/urandom
58.br
0720d60c 59.I /dev/random
6dbe3af9 60.SH "SEE ALSO"
f053ff1e 61.BR md5sum (1),
6dbe3af9 62.BR X (1),
726f69e2 63.BR xauth (1),
0720d60c 64.BR rand (3)
86d62711 65.SH AVAILABILITY
601d12fb 66The mcookie command is part of the util-linux package and is available from
d673b74e 67.UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
0720d60c
SK
68Linux Kernel Archive
69.UE .