File: mcookie.1

package info (click to toggle)
util-linux 2.13.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 15,436 kB
  • ctags: 4,442
  • sloc: ansic: 44,678; sh: 5,683; makefile: 651; perl: 86; csh: 43; sed: 16
file content (51 lines) | stat: -rw-r--r-- 1,380 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
.\" mcookie.1 -- 
.\" Public Domain 1995 Rickard E. Faith (faith@cs.unc.edu)
.TH MCOOKIE 1 "25 September 1995" "" "Linux Programmer's Manual"
.SH NAME
mcookie \- generate magic cookies for xauth
.SH SYNOPSIS
.BI "mcookie [\-v] [\-f " filename " ]"
.SH DESCRIPTION
.B mcookie
generates a 128-bit random hexadecimal number for use with the X authority
system.  Typical usage:
.RS
xauth add :0 . `mcookie`
.RE
.PP
The "random" number generated is actually the output of the MD5 message
digest fed with various piece of random information: the current time, the
process id, the parent process id, the contents of an input file (if
.B \-f
is specified), and several bytes of information from the first of the
following devices which is present:
.IR /dev/random ,
.IR /dev/urandom ,
files in
.IR /proc ,
.IR /dev/audio .
.SH BUGS
The entropy in the generated 128-bit is probably quite small (and,
therefore, vulnerable to attack) unless a non-pseudorandom number generator
is used (e.g.,
.I /dev/random
under Linux).
.PP
It is assumed that none of the devices opened will block.
.SH FILES
.I /dev/random
.br
.I /dev/urandom
.br
.I /dev/audio
.br
.I /proc/stat
.br
.I /proc/loadavg
.SH "SEE ALSO"
.BR X (1),
.BR xauth (1),
.BR md5sum (1)
.SH AVAILABILITY
The mcookie command is part of the util-linux-ng package and is available from
ftp://ftp.kernel.org/pub/linux/utils/util-linux-ng/.