Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     RANDOMWORD(S)             UNIX System V             RANDOMWORD(S)



     Name
          randomword - generate a pronounceable password

     Syntax
          #include <sys/types.h>
          #include <sys/security.h>
          #include <sys/audit.h>
          #include <prot.h>

          int randomword (word, hyphenated_word, min, max, restrict,
                        seed)
          char *word;
          char *hyphenated_word;
          unsigned short int min;
          unsigned short int max;
          int restrict;
          long seed;

     Description
          randomword places a null-terminated random pronounceable
          password into the user-supplied space word and returns the
          length of the generated word.  The hyphenated version of the
          word is placed in hyphenated_word.

          The min and max arguments denote the minimum and maximum
          lengths allowed for word.  Min may equal max, but may not be
          greater than max, and neither may be negative.  The user
          space pre-allocated is at least max for word and 2*max-1 for
          hyphenated_word.  Of course, the smaller min and max are,
          the less the selection of random words.  For a program like
          login(M), suggested values are 6 for min and 8 for max.

          The argument restrict is 0 when no restrictions are placed
          on the generated word.  It is non-zero when the words
          generated pass the tests of the routine acceptable_password
          described by accept_pw(S).

          The seed argument specifies an initial seed for the random
          number generator used by randomword . It is used by the
          routine only on the first time it is called;  the argument
          is ignored on subsequent calls.

     Notes
          The password generator relies on a random number generator
          that produces uniformly distributed integers.  Because the
          password generator invokes the random number generator many
          times even for one word, the random number generator has to
          be very good.  The period (distinct numbers produced given a
          particular seed) and number space (range of possible
          numbers) must both be large.

     Files
          /etc/passwd
          /etc/group

     See Also
          login(M), passwd(C), accept_pw(S), drand48(S), seed(S)

     Value Added
          randomword is an extension of AT&T System V provided by the
          Santa Cruz Operation.

                                             (printed 6/20/89)



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026