util-linux/misc-utils/mcookie.1

70 lines
1.8 KiB
Groff
Raw Normal View History

.\" mcookie.1 --
2006-12-06 17:25:32 -06:00
.\" Public Domain 1995 Rickard E. Faith (faith@cs.unc.edu)
.TH MCOOKIE 1 "March 2014" "util-linux" "User Commands"
2006-12-06 17:25:32 -06:00
.SH NAME
mcookie \- generate magic cookies for xauth
.SH SYNOPSIS
.B mcookie
[\fIoptions\fR]
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:
.RS
xauth add :0 . `mcookie`
.RE
2006-12-06 17:25:33 -06:00
.PP
The "random" number generated is actually the output of the MD5 message
digest fed with random information from one of the sources
2006-12-06 17:25:37 -06:00
.IR /dev/urandom ,
.IR /dev/random ,
or
.I "libc pseudo-random functions"
in this preference order.
.SH OPTIONS
.TP
\fB\-f\fR, \fB\-\-file\fR=\fIFILE\fR
Use additional file as a macig cookie random seed. When file is defined
as '-' character input is read from stdin.
.TP
\fB\-m\fR, \fB\-\-max\-size\fR=\fInumber\fR
Read form
.I FILE
only
.I number
of bytes. This option is meant to be used when reading additional
randomness from a device.
.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
\fB\-v\fR, \fB\-\-verbose\fR
Inform where randomness originated, with amount of entropy read from each
source.
.TP
\fB\-V\fR, \fB\-\-version\fR
Display version information and exit.
.TP
\fB\-h\fR, \fB\-\-help\fR
Display help text and exit.
2006-12-06 17:25:33 -06:00
.SH BUGS
It is assumed that none of the randomness sources will block.
2006-12-06 17:25:33 -06:00
.SH FILES
.I /dev/urandom
.br
.I /dev/random
2006-12-06 17:25:32 -06:00
.SH "SEE ALSO"
.BR X (1),
2006-12-06 17:25:33 -06:00
.BR xauth (1),
.BR md5sum (1),
.BR rand (3)
.SH AVAILABILITY
The mcookie command is part of the util-linux package and is available from
.UR ftp://\:ftp.kernel.org\:/pub\:/linux\:/utils\:/util-linux/
Linux Kernel Archive
.UE .