3 .\" Author: [see the "AUTHOR(S)" section]
4 .\" Generator: Asciidoctor 2.0.15
6 .\" Manual: User Commands
7 .\" Source: util-linux 2.38
10 .TH "MCOOKIE" "1" "2022-02-17" "util\-linux 2.38" "User Commands"
28 . LINKSTYLE blue R < >
31 mcookie \- generate magic cookies for xauth
34 \fBmcookie\fP [options]
37 \fBmcookie\fP generates a 128\-bit random hexadecimal number for use with the X authority system. Typical usage:
41 \fBxauth add :0 . \f(CRmcookie\fP\fP
46 The "random" number generated is actually the MD5 message digest of random information coming from one of the sources \fBgetrandom\fP(2) system call, \fI/dev/urandom\fP, \fI/dev/random\fP, or the \fIlibc pseudo\-random functions\fP, in this preference order. See also the option \fB\-\-file\fP.
49 \fB\-f\fP, \fB\-\-file\fP \fIfile\fP
51 Use this \fIfile\fP as an additional source of randomness (for example \fI/dev/urandom\fP). When \fIfile\fP is \(aq\-\(aq, characters are read from standard input.
54 \fB\-m\fP, \fB\-\-max\-size\fP \fInumber\fP
56 Read from \fIfile\fP only this \fInumber\fP of bytes. This option is meant to be used when reading additional randomness from a file or device.
58 The \fInumber\fP 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.
61 \fB\-v\fP, \fB\-\-verbose\fP
63 Inform where randomness originated, with amount of entropy read from each source.
66 \fB\-h\fP, \fB\-\-help\fP
68 Display help text and exit.
71 \fB\-V\fP, \fB\-\-version\fP
73 Print version and exit.
82 It is assumed that none of the randomness sources will block.
91 For bug reports, use the issue tracker at \c
92 .URL "https://github.com/util\-linux/util\-linux/issues" "" "."
95 The \fBmcookie\fP command is part of the util\-linux package which can be downloaded from \c
96 .URL "https://www.kernel.org/pub/linux/utils/util\-linux/" "Linux Kernel Archive" "."