Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mcookie(1) [linux man page]

MCOOKIE(1)						     Linux Programmer's Manual							MCOOKIE(1)

NAME
mcookie - generate magic cookies for xauth SYNOPSIS
mcookie [-v] [-f filename] DESCRIPTION
mcookie generates a 128-bit random hexadecimal number for use with the X authority system. Typical usage: xauth add :0 . `mcookie` The "random" number generated is actually the output of the MD5 message digest fed with various pieces of random information: the current time, the process id, the parent process id, the contents of an input file (if -f is specified), and several bytes of information from the first of the following devices which is present: /dev/random, /dev/urandom, files in /proc, /dev/audio. BUGS
The entropy in the generated 128-bit is probably quite small (and, therefore, vulnerable to attack) unless a non-pseudorandom number gener- ator is used (e.g., /dev/random under Linux). It is assumed that none of the devices opened will block. FILES
/dev/random /dev/urandom /dev/audio /proc/stat /proc/loadavg SEE ALSO
X(1), xauth(1), md5sum(1) AVAILABILITY
The mcookie command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/. 25 September 1995 MCOOKIE(1)

Check Out this Related Man Page

RANDOM(4)						   BSD Kernel Interfaces Manual 						 RANDOM(4)

NAME
random , urandom -- random data source devices. SYNOPSIS
pseudo-device random DESCRIPTION
The random device produces uniformly distributed random byte values of potentially high quality. To obtain random bytes, open /dev/random for reading and read from it. The same random data is also available from getentropy(2). Using the getentropy(2) system call interface will provide resiliency to file descriptor exhaustion, chroot, or sandboxing which can make /dev/random unavailable. Additionally, the arc4random(3) API provides a fast userspace random number generator built on the random data source and is preferred over directly accessing the system's random device. /dev/urandom is a compatibility nod to Linux. On Linux, /dev/urandom will produce lower quality output if the entropy pool drains, while /dev/random will prefer to block and wait for additional entropy to be collected. With Yarrow, this choice and distinction is not necessary, and the two devices behave identically. You may use either. The random device implements the Yarrow pseudo random number generator algorithm and maintains its entropy pool. The kernel automatically seeds the algorithm with additional entropy during normal execution. FILES
/dev/random /dev/urandom HISTORY
A random device appeared in the Linux operating system. Darwin September 6, 2001 Darwin
Man Page

15 More Discussions You Might Find Interesting

1. News, Links, Events and Announcements

Flaw leaves Linux computers vulnerable

NEWS: Flaw leaves Linux computers vulnerable http://news.com.com/2100-1001-857265.html A flaw in a software-compression library used in all versions of Linux could leave the lion's share of systems based on the open-source operating system open to attack, said sources in the security... (3 Replies)
Discussion started by: killerserv
3 Replies

2. Filesystems, Disks and Memory

Destroying data down to the 13th level???

I belong on the 'UNIX for Dummies Questions' forum but I need to delete information on a sensitive SUN box. The company is going to use the box for a web server and I need to have the hard drives Completely clean!!! One of the bosses 'friends' through out the term 13th level. And now it's the... (10 Replies)
Discussion started by: lenny_lab
10 Replies

3. Programming

Need ideas how to attack this problem

I'm at a total loss how to attack this problem. I have a file that contains ab What I need to do is if 1)if the string "ab" doesn't contain a newline, I need to insert one back into the buffer. 2)If the file contains two consecutive blank lines, skip over it. Here is what I started ... (5 Replies)
Discussion started by: frequency8
5 Replies

4. Linux

Installation of Linux in 300 MHz with 128 MB ram

Hi I am very new to Linux, but very keen to learn it. I am having a desktop of 300 MHz with 128 MB RAM and 30 GB hard drive with Windows XP. My first question is - Is there any version/flavour of Linux available that can be installed on above system especially Fedora with less compromise... (6 Replies)
Discussion started by: sanjay1979
6 Replies

5. What is on Your Mind?

The linux i use

Check out the linux i use (: Plz leave a comment if you watch the video and tell me what u think Keep in mind its my first time recording with recordmydesktop I couldnt figure out the audio settings (Deleted Link) (2 Replies)
Discussion started by: Dervish
2 Replies

6. UNIX and Linux Applications

Linux Ftp Server

Hi Anyone out there know how to change the linux ftp server message. ftp> bye 221-You have transferred 0 bytes in 0 files. 221-Total traffic for this session was 197 bytes in 0 transfers. 221-Thank you for using the FTP service on kgsainss103. 221 Goodbye. the end message Goodbye. to... (2 Replies)
Discussion started by: netxus
2 Replies

7. UNIX for Advanced & Expert Users

Number of files currently opened in linux

Hello, How do i check number of files currently opening in the linux server? Your help is highly appreciated. Thank you ---------- Post updated at 02:43 PM ---------- Previous update was at 02:19 PM ---------- never mind!! I got it. ---------- Post updated at 02:44 PM ---------- Previous... (3 Replies)
Discussion started by: govindts
3 Replies

8. Shell Programming and Scripting

Random pieces of number

Hello folks, i have number for example 10 and i want to divide into 4 random pieces that may be (6+2+1+1). How can i do this via script i have random number 234951 and i want to divide into 31 pieces. (6 Replies)
Discussion started by: learnbash
6 Replies

9. Shell Programming and Scripting

Display shell online

Is there a way to get $random to work in shell? If I don't include bourne shell ( !#/bin/sh ) My program works.... however, I need to include !#/bin/sh in order to display my program on the internet. (8 Replies)
Discussion started by: puttster
8 Replies

10. Shell Programming and Scripting

md5sum in different linux

something strange is that i find the md5sum command in different linux generate different result, for example, i have tried the same file in CentOS and Rhel, The md5 results are different, it is quite headache, who know the tricks? (3 Replies)
Discussion started by: zbc
3 Replies

11. Homework & Coursework Questions

Process, where each process generates a random integer

Hello all, I am writing a program where user enters an integer and the program creates that number of processes. Each child process generates a random integer. When a child process calls a procedure say Myprocedure it should terminate where as the parent process wait for the child to terminate. (4 Replies)
Discussion started by: manisum
4 Replies

12. Linux

SUSE Linux

i'm new linux ... after reboot ...... my keyboard is notworking automatically boot ..... after few mins Waiting for mandatory devices: eth-id-00:10:a7:08:cb:4b 12 11 9 8 7 5 4 3 1 0 eth0 interface could not be set up failed Setting up service network . . . . . . . . . . . . . ... (2 Replies)
Discussion started by: coolboys
2 Replies

13. Shell Programming and Scripting

Need to generate a file with random data. /dev/[u]random doesn't exist.

Need to use dd to generate a large file from a sample file of random data. This is because I don't have /dev/urandom. I create a named pipe then: dd if=mynamed.fifo do=myfile.fifo bs=1024 count=1024 but when I cat a file to the fifo that's 1024 random bytes: cat randomfile.txt >... (7 Replies)
Discussion started by: Devyn
7 Replies

14. Linux

How can I keep certain characters from appearing in a filename?

hi i know this is irrelevant to the question above but i was wondering how to pt a restriction in the filename in linux. I want that it is impossible to add numbers into the filename, help will be rely great , thanx! This posting was initially given as a reply to an unrelated thread. It has been... (2 Replies)
Discussion started by: samirboss
2 Replies

15. HP-UX

Dev/urandom and dev/random missing in HP-UX

Hi, In our HP-UX B.11.11. I could not find dev/urandom and dev/random Are all pseudo-devices implemented as device drivers, or in need to run /configure some package to install the package to have dev/urandom. Please help (4 Replies)
Discussion started by: rashi
4 Replies