]> git.ipfire.org Git - thirdparty/util-linux.git/blob - misc-utils/mcookie.1.adoc
Merge branch 'PR/libmount-utab-event' of github.com:karelzak/util-linux-work
[thirdparty/util-linux.git] / misc-utils / mcookie.1.adoc
1 //po4a: entry man manual
2 // mcookie.1 --
3 // Public Domain 1995 Rickard E. Faith (faith@cs.unc.edu)
4 = mcookie(1)
5 :doctype: manpage
6 :man manual: User Commands
7 :man source: util-linux {release-version}
8 :page-layout: base
9 :command: mcookie
10
11 == NAME
12
13 mcookie - generate magic cookies for xauth
14
15 == SYNOPSIS
16
17 *mcookie* [options]
18
19 == DESCRIPTION
20
21 *mcookie* generates a 128-bit random hexadecimal number for use with the X authority system. Typical usage:
22
23 ____
24 *xauth add :0 . `mcookie`*
25 ____
26
27 The "random" number generated is actually the MD5 message digest of random information coming from one of the sources *getrandom*(2) system call, _/dev/urandom_, _/dev/random_, or the _libc pseudo-random functions_, in this preference order. See also the option *--file*.
28
29 == OPTIONS
30
31 *-f*, *--file* _file_::
32 Use this _file_ as an additional source of randomness (for example _/dev/urandom_). When _file_ is '-', characters are read from standard input.
33
34 *-m*, *--max-size* _number_::
35 Read from _file_ only this _number_ of bytes. This option is meant to be used when reading additional randomness from a file or device.
36 +
37 The _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.
38
39 *-v*, *--verbose*::
40 Inform where randomness originated, with amount of entropy read from each source.
41
42 include::man-common/help-version.adoc[]
43
44 == FILES
45
46 _/dev/urandom_
47
48 _/dev/random_
49
50 == BUGS
51
52 It is assumed that none of the randomness sources will block.
53
54 == SEE ALSO
55
56 *md5sum*(1),
57 *X*(7),
58 *xauth*(1),
59 *rand*(3)
60
61 include::man-common/bugreports.adoc[]
62
63 include::man-common/footer.adoc[]
64
65 ifdef::translation[]
66 include::man-common/translation.adoc[]
67 endif::[]