From 08566431c47de590b140949bca4f6fc69903c52a Mon Sep 17 00:00:00 2001
From: Bruce Momjian <bruce@momjian.us>
Date: Sun, 21 Sep 1997 04:54:36 +0000
Subject: [PATCH] Make manual page for pg_passwd from README.

---
 src/bin/pg_passwd/README | 111 -------------------------------------
 src/man/pg_passwd.1      | 116 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 116 insertions(+), 111 deletions(-)
 delete mode 100644 src/bin/pg_passwd/README
 create mode 100644 src/man/pg_passwd.1

diff --git a/src/bin/pg_passwd/README b/src/bin/pg_passwd/README
deleted file mode 100644
index b411a74b00c..00000000000
--- a/src/bin/pg_passwd/README
+++ /dev/null
@@ -1,111 +0,0 @@
-The pathces and a prototype tool to manipulate the ``flat password file
-'' functionality of PostgreSQL6.1
-1. File
-Makefile
-pg_passwd.c           the source file of the tool.
-2. How to specify pasword files and their format.
-Specify the password file in the same style of Ident authentication in
-$PGDATA/pg_hba.conf
-host  unv     133.65.96.250   255.255.255.255 password passwd
-The above line allows access from 133.65.96.250 using the passwords listed
-in $PGDATA/passwd.
-The format of the password files follows those of /etc/passwd and
-/etc/shadow: the first field is the user name, and  the second field
-is the encrypted password.  The rest is completely ignored.  Thus
-the following three sample lines specify the same user and password pair:.
-pg_guest:/nB7.w5Auq.BY:10031::::::
-pg_guest:/nB7.w5Auq.BY:93001:930::/home/guest:/bin/tcsh
-pg_guest:/nB7.w5Auq.BY:93001
-Note that the original src/backend/libpq/password.c has a bug, which
-disallows the first and the second format.  If you want to use these
-formats, please make sure you've applied the patch accompanied with
-this tool.
-3. Usage of pg_passwd
-Supply the password file to the pg_passwd command.   In the case described
-above, after ``cd'ing to $PGDATA,  the following command execution specify
-the new password for pg_guest:
-% pg_passwd passwd
-Username: pg_guest
-Password:
-Re-enter password:
-where the Password: and Re-enter password: prompts require the same
-password input which are not displayed on the terminal.
-The original password file is renamed to ``passwd.bk''.
-4. How to specify pasasword authentication
-You can use the password authentication fro psq, perl, or pg{tcl,tk}sh.
-4.1 psql
-Use the -u option.  Note that the original distribution includes a bug.
-Please make sure you've applied the patch distributed with this tool.
-The following lines show the sample usage of the option:
-% psql -h hyalos -u unv
-Username: pg_guest
-Password:
-Welcome to the POSTGRESQL interactive sql monitor:
-  Please read the file COPYRIGHT for copyright terms of POSTGRESQL
-   type \? for help on slash commands
-   type \q to quit
-   type \g or terminate with semicolon to execute query
- You are currently connected to the database: unv
-unv=>
-4.2 perl5
-Use the new style of the Pg.pm like this
-$conn = Pg::connectdb("host=hyalos authtype=password dbname=unv
-                       user=pg_guest password=xxxxxxx");
-For more details, the users refer to to ``src/pgsql_perl5/Pg.pm''.
-4.3 pg{tcl,tk}sh
-Use the pg_connect comamnd with -conninfo option thus
-% set conn [pg_connect -conninfo \
-        "host=hyalos authtype=password dbname=unv \
-         user=pg_guest password=xxxxxxx "]
-Use can list all of the keys for the option by executing the following
-command:
-% puts [ pg_conndefaults]
-5. Acknowledgment
-Mr. Ishii, SRA, pointed out the original bugs in the tool.  He also
-supplied the Makefile for this distribution.
--------------------------------------------------------------------------
-July 2, 1997
-Yoshihiko Ichikawa, Dept of Info Sci, Fac of Sci, Ochanomizu University
-E-mail: ichikawa@is.ocha.ac.jp
-
-PostgreSQL Data Base Management System (formerly known as Postgres, then
-as Postgres95).
-  
-This directory contains the version 6.1 release of the PostgreSQL
-database server.  The server is not ANSI SQL compliant, but it gets
-closer with every release.  After you unzip and untar the distribution
-file, look at file INSTALL for the installation notes and file HISTORY
-for the changes.
-
-The latest version of this software may be obtained at
-ftp://ftp.postgresql.org/pub/.  For more information look at our WWW
-home page located at http://www.postgreSQL.org/.
-
-PostgreSQL is not public domain software.  It is copyrighted by the
-University of California but may be used according to the licensing
-terms of the the copyright below:
-
-------------------------------------------------------------------------
-
-POSTGRES95 Data Base Management System (formerly known as Postgres, then
-as Postgres95).
-
-Copyright (c) 1994-7 Regents of the University of California
-
-Permission to use, copy, modify, and distribute this software and its
-documentation for any purpose, without fee, and without a written agreement
-is hereby granted, provided that the above copyright notice and this
-paragraph and the following two paragraphs appear in all copies.
-
-IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
-DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING
-LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS
-DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
-
-THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
-INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
-AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
-ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO
-PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
-
diff --git a/src/man/pg_passwd.1 b/src/man/pg_passwd.1
new file mode 100644
index 00000000000..5a4aa1dd348
--- /dev/null
+++ b/src/man/pg_passwd.1
@@ -0,0 +1,116 @@
+.\" This is -*-nroff-*-
+.\" XXX standard disclaimer belongs here....
+.\" $Header: /cvsroot/pgsql/src/man/Attic/pg_passwd.1,v 1.1 1997/09/21 04:54:36 momjian Exp $
+.TH PG_PASSWD UNIX 11/05/95 PostgreSQL PostgreSQL
+.SH NAME
+pg_passwd \(em manipulate the flat password file
+.SH SYNOPSIS
+.BR "pg_passwd password_file"
+.SH DESCRIPTION
+.IR Pg_passwd
+is a tool to manipulate the
+flat password file functionality of PostgreSQL.
+Specify the password file in the same style of Ident authentication in
+.IR $PGDATA/pg_hba.conf :
+.nf
+
+	host  unv     133.65.96.250   255.255.255.255 password passwd
+
+.fi
+The above line allows access from 133.65.96.250 using the passwords listed
+in
+.IR $PGDATA/passwd .
+The format of the password file follows those of
+.IR /etc/passwd
+and
+.IR /etc/shadow .
+The first field is the user name, and  the second field
+is the encrypted password.
+The rest is completely ignored.
+Thus the following three sample lines specify the same user and password pair:
+.nf
+
+	pg_guest:/nB7.w5Auq.BY:10031::::::
+	pg_guest:/nB7.w5Auq.BY:93001:930::/home/guest:/bin/tcsh
+	pg_guest:/nB7.w5Auq.BY:93001
+
+.fi
+Supply the password file to the pg_passwd command.
+In the case described above, after 
+.IR cd "'ing"
+to $PGDATA, the following command execution specify
+the new password for pg_guest:
+.nf
+
+	% pg_passwd passwd
+	Username: pg_guest
+	Password:
+	Re-enter password:
+
+.fi
+where the
+.IR Password:
+and
+.IR "Re-enter password:"
+prompts require the same password input which are not displayed
+on the terminal.
+The original password file is renamed to
+.BR "passwd.bk" .
+.PP
+.BR "Psql authentication"
+uses the 
+.BR -u
+option.
+The following lines show the sample usage of the option:
+.nf
+
+	% psql -h hyalos -u unv
+	Username: pg_guest
+	Password:
+	Welcome to the POSTGRESQL interactive sql monitor:
+	  Please read the file COPYRIGHT for copyright terms of POSTGRESQL
+	   type \\? for help on slash commands
+	   type \\q to quit
+	   type \\g or terminate with semicolon to execute query
+	 You are currently connected to the database: unv
+	unv=>
+
+.fi
+.BI "Perl5 authentication"
+uses the new style of the Pg.pm like this:
+.nf
+
+	$conn = Pg::connectdb("host=hyalos authtype=password dbname=unv
+	                       user=pg_guest password=xxxxxxx");
+
+.fi
+For more details, refer to 
+.IR src/pgsql_perl5/Pg.pm .
+.PP
+.BR "Pg{tcl,tk}sh authentication"
+uses the
+.IR pg_connect
+command with the
+.IR -conninfo
+option thus:
+.nf
+
+	% set conn [pg_connect -conninfo \\
+	        "host=hyalos authtype=password dbname=unv \\
+	         user=pg_guest password=xxxxxxx "]
+
+.fi
+Use can list all of the keys for the option by executing the following
+command:
+.nf
+
+	% puts [ pg_conndefaults]
+
+.fi
+.SH FILES
+.TP 5n
+$PGDATA/pg_hba.conf
+The Host Based Authentication file
+.SH "SEE ALSO"
+psql(1).
+
-- 
GitLab