2009-07-22 04:29:04 -05:00
|
|
|
.\" mcookie.1 --
|
2006-12-06 17:25:32 -06:00
|
|
|
.\" Public Domain 1995 Rickard E. Faith (faith@cs.unc.edu)
|
2014-12-14 13:45:31 -06:00
|
|
|
.TH MCOOKIE 1 "December 2014" "util-linux" "User Commands"
|
2006-12-06 17:25:32 -06:00
|
|
|
.SH NAME
|
|
|
|
mcookie \- generate magic cookies for xauth
|
|
|
|
.SH SYNOPSIS
|
2009-07-22 04:29:04 -05:00
|
|
|
.B mcookie
|
2014-12-14 13:45:29 -06:00
|
|
|
[options]
|
2006-12-06 17:25:32 -06:00
|
|
|
.SH DESCRIPTION
|
|
|
|
.B mcookie
|
|
|
|
generates a 128-bit random hexadecimal number for use with the X authority
|
|
|
|
system. Typical usage:
|
2014-12-14 13:45:31 -06:00
|
|
|
.sp
|
2006-12-06 17:25:32 -06:00
|
|
|
.RS
|
2014-12-14 13:45:31 -06:00
|
|
|
.B xauth add :0 . `mcookie`
|
2006-12-06 17:25:32 -06:00
|
|
|
.RE
|
2006-12-06 17:25:33 -06:00
|
|
|
.PP
|
2014-12-14 13:45:31 -06:00
|
|
|
The "random" number generated is actually the MD5 message
|
|
|
|
digest of random information coming from one of the sources
|
2018-05-18 19:09:56 -05:00
|
|
|
.IR getrandom ()
|
2018-03-19 08:03:33 -05:00
|
|
|
system call,
|
2006-12-06 17:25:37 -06:00
|
|
|
.IR /dev/urandom ,
|
2014-03-08 15:43:26 -06:00
|
|
|
.IR /dev/random ,
|
2014-12-14 13:45:31 -06:00
|
|
|
or the
|
|
|
|
.IR "libc pseudo-random functions" ,
|
2018-03-19 08:03:33 -05:00
|
|
|
in this preference order. See also the option \fB\-\-file\fR.
|
2011-06-11 10:44:12 -05:00
|
|
|
.SH OPTIONS
|
|
|
|
.TP
|
2014-12-14 13:45:31 -06:00
|
|
|
.BR \-f , " \-\-file " \fIfile
|
2018-03-19 08:03:33 -05:00
|
|
|
Use this \fIfile\fR as an additional source of randomness (for example /dev/urandom).
|
2014-12-14 13:45:31 -06:00
|
|
|
When \fIfile\fR is '-', characters are read from standard input.
|
2011-06-11 10:44:12 -05:00
|
|
|
.TP
|
2014-12-14 13:45:31 -06:00
|
|
|
.BR \-m , " \-\-max\-size " \fInumber
|
|
|
|
Read from \fIfile\fR only this \fInumber\fR of bytes.
|
|
|
|
This option is meant to be used when reading additional
|
|
|
|
randomness from a file or device.
|
2014-03-08 15:43:30 -06:00
|
|
|
.IP
|
|
|
|
The
|
|
|
|
.I number
|
|
|
|
argument may be followed by the multiplicative suffixes KiB=1024,
|
|
|
|
MiB=1024*1024, and so on for GiB, TiB, PiB, EiB, ZiB and YiB (the "iB" is
|
|
|
|
optional, e.g., "K" has the same meaning as "KiB") or the suffixes
|
|
|
|
KB=1000, MB=1000*1000, and so on for GB, TB, PB, EB, ZB and YB.
|
|
|
|
.TP
|
2014-12-14 13:45:31 -06:00
|
|
|
.BR \-v , " \-\-verbose"
|
2014-03-08 15:43:26 -06:00
|
|
|
Inform where randomness originated, with amount of entropy read from each
|
|
|
|
source.
|
2011-06-11 10:44:12 -05:00
|
|
|
.TP
|
2014-12-14 13:45:31 -06:00
|
|
|
.BR \-V , " \-\-version"
|
2013-10-14 14:34:39 -05:00
|
|
|
Display version information and exit.
|
2011-06-11 10:44:12 -05:00
|
|
|
.TP
|
2014-12-14 13:45:31 -06:00
|
|
|
.BR \-h , " \-\-help"
|
2013-10-14 14:34:39 -05:00
|
|
|
Display help text and exit.
|
2006-12-06 17:25:33 -06:00
|
|
|
.SH FILES
|
|
|
|
.I /dev/urandom
|
|
|
|
.br
|
2014-03-08 15:43:26 -06:00
|
|
|
.I /dev/random
|
Manual pages: order NOTES / HISTORY / BUGS / EXAMPLE consistently
There is value in ensuring that manual page sections use consistently
named sections, as far as possible, and also that sections have a
consistent order within manual pages. This is one of a series of patches
to place manual page sections in a consistent order.
In this patch, we ensure that the NOTES, HISTORY, BUGS, and EXAMPLE
sections are always placed near the end of the page, just above
AUTHORS, COPYRIGHT, SEE ALSO, and AVAILABILITY.
One page is not fixed by this patch: term-utils/agetty.8. This page
is a mess of unusual section names, and probably requires an individual
edit.
Testing that no gross editing mistake (causing accidental loss or addition
of text) was performed as follows:
$ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > a
[Apply patch]
$ cat $(grep '\.SH' -l $(find . -name '*.[1-9]') |sort) | sort > b
$ diff a b
$ echo $?
0
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
2020-05-21 02:28:32 -05:00
|
|
|
.SH BUGS
|
|
|
|
It is assumed that none of the randomness sources will block.
|
2020-05-19 03:31:19 -05:00
|
|
|
.SH SEE ALSO
|
2016-11-10 04:59:27 -06:00
|
|
|
.BR md5sum (1),
|
2019-08-24 16:34:16 -05:00
|
|
|
.BR X (7),
|
2006-12-06 17:25:33 -06:00
|
|
|
.BR xauth (1),
|
2014-03-08 15:43:26 -06:00
|
|
|
.BR rand (3)
|
2007-07-02 18:17:04 -05:00
|
|
|
.SH AVAILABILITY
|
2010-11-30 04:41:59 -06:00
|
|
|
The mcookie command is part of the util-linux package and is available from
|
2016-12-17 02:06:57 -06:00
|
|
|
.UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
|
2014-03-08 15:43:26 -06:00
|
|
|
Linux Kernel Archive
|
|
|
|
.UE .
|