RANDOMPW version 1.2.0
======================

'randompw' is a Unix/Linux command to generate random passwords.

It is primarily intended for use in setting up new user accounts
from an automated script.

Users can also use it to help them pick new passwords when they
need to change passwords.  Thus it is intended to be installed
as a generally accessible binary.

By default, 'randompw' generates an eight character password that
may consist of a combination of upper and lower case alpha characters
and numbers.

Several options may be provided to change the default operation such
as specifying different password lengths, alpha characters only, 
upper or lower case only, include special symbols, sequence checking,
guarantee at least one number in the generated password, and the number
of passwords to generate.

Sequence checking means that passwords will not be generated containing
two or more duplicate or sequential characters.  For example, sequences
such as "cc", "cb", "bc", "33", "43", "34" will not be found within
the generated password.

Building and installing:
------------------------

1. Create a directory to unpack the source files and switch to that new
   directory:

   mkdir /usr/local/randompw

   cd /usr/local/randompw

2. Unpack the source tarball (If you use this technique, don't forget the
   trailing hyphen (-) on the tar command:

   gunzip -c /<download_directory_path>/randompw-1.2.0.tar.gz | tar -xvf -

3. Switch to the source tree directory:

   cd /usr/local/randompw/randompw-1.2.0


4. Edit the Makefile defaults as desired:

   By default, 'make install' will place the 'randompw' binary in the
   "/usr/bin" directory and the man page in the "/usr/share/man" directory
   path.

   In the Makefile, the BINDIR variable is where the 'randompw' binary
   will be placed and the MANDIR variable is where the man page will be
   placed upon a "make install" command.

   Optionally, you can override the BINDIR and MANDIR variables on the 'make'
   command line.
   
   Note: Some versions of 'make' have difficulties with conditional statements
   ----- such as 'ifeq'.  If you experience problems with the conditional
         statements in the Makefile, you can remove them by deleting the
         lines that contain 'ifeq', 'endif' and everything between them.

   If you like your man pages 'gzipped', you can also either edit the
   MANZIP variable in the Makefile to change it from 'n' to 'y' or
   override it on the 'make install' command as follows:

   make <other make options> MANZIP=y install

   The 'gzip' option for the man page will only work if your version of
   'make' supports the 'ifeq' conditional statements.  If you version of
   'make' does not support 'ifeq' conditional statements, you can edit
   the Makefile and remove the 'ifeq' and 'endif' statements that surround
   the 'gzip' command in the install section of the Makefile.

5. Compile the source modules:

   make clean
   
   make

6. Test the compiled program:

   ./randompw --help

   ./randompw --size=6 --lower --sequence

   ./randompw -ln100s32

7. Test the man page

   man -M. randompw

8. If everything appears satisfactory, install the binary and man page:

   make install

Notes:
------

If you elected not to edit the Makefile and chose to override the BINDIR
and MANDIR variables on the 'make install' command, you can do so as follows:

make BINDIR=\"/usr/bin\" MANDIR=\"/usr/share/man\" install

Where: /usr/bin is whatever binary directory you choose and /usr/share/man is
       whatever man page directory you choose.

Using 'randompw' with your 'useradd' scripts:
---------------------------------------------

You may elect to incorporate 'randompw' into your useradd scripts to auto-
matically generate a random password for a new user and email the newly
generated password to the user.

Example:

p=`randompw -lq`;useradd -c"User name" -d/home/login_name -m && \
echo $p | passwd --stdin login_name &&   \
echo "Your new account password is $p" | \
mail -s "Your new account" some_email@some_domain


Note: Please don't try to email the password to the newly created
----- account's mailbox, instead mail it to an existing alternate
      mailbox, such as the manager's mailbox.

Uninstalling 'randompw':
------------------------

'randompw' may be uninstalled if you wish simply by issuing a
'make uninstall' command from the 'randompw' source directory.

If you installed 'randompw' or its man page in a directory other
than the default, be sure to edit the Makefile appropriately or
provide the correct variable overrides to the 'make' command.

Files:
------

<source_tree>/randompw-1.2.0/Makefile           The Makefile for 'randompw'.
<source_tree>/randompw-1.2.0/README             This README file.
<source_tree>/randompw-1.2.0/RELEASE-NOTES      Notes about changes to randompw versions.
<source_tree>/randompw-1.2.0/randompw.c         'randompw' C source program.
<source_tree>/randompw-1.2.0/randompw.h         'randompw' C header file.
<source_tree>/randompw-1.2.0/randompw           'randompw' binary (after make).
<source_tree>/randompw-1.2.0/man1/randompw.1    'randompw' man page.
/usr/bin/randompw                               Binary after make install.
/usr/share/man/man1/randompw.1                  Man page after make install.

License:
--------

'randompw' is free software and may be freely distributed provided
that it is distributed in its original form and entirety.  Credit
to the author (Marc Niegowski) must be present with any distribution
of this software.

'randompw' is provided with NO WARRANTY whatsoever, either expressed
or implied.

Copyright:
----------

Copyright  1987-2005, Marc Niegowski
Connectivity, Inc.
All rights reserved.

23 W. Fourth Street
Media, PA 19063-2805
USA

Phone: 610-566-0227
Fax:   610-566-0641

Email: Marc@Tech-Center.com
Web:   http://www.marcsweb.com
Ftp:   ftp://ftp.marcsweb.com

(END)
