|
| 1 | +The pathces and a prototype tool to manipulate the ``flat password file |
| 2 | +'' functionality of PostgreSQL6.1 |
| 3 | +1. File |
| 4 | +Makefile |
| 5 | +pg_passwd.c the source file of the tool. |
| 6 | +2. How to specify pasword files and their format. |
| 7 | +Specify the password file in the same style of Ident authentication in |
| 8 | +$PGDATA/pg_hba.conf |
| 9 | +host unv 133.65.96.250 255.255.255.255 password passwd |
| 10 | +The above line allows access from 133.65.96.250 using the passwords listed |
| 11 | +in $PGDATA/passwd. |
| 12 | +The format of the password files follows those of /etc/passwd and |
| 13 | +/etc/shadow: the first field is the user name, and the second field |
| 14 | +is the encrypted password. The rest is completely ignored. Thus |
| 15 | +the following three sample lines specify the same user and password pair:. |
| 16 | +pg_guest:/nB7.w5Auq.BY:10031:::::: |
| 17 | +pg_guest:/nB7.w5Auq.BY:93001:930::/home/guest:/bin/tcsh |
| 18 | +pg_guest:/nB7.w5Auq.BY:93001 |
| 19 | +Note that the original src/backend/libpq/password.c has a bug, which |
| 20 | +disallows the first and the second format. If you want to use these |
| 21 | +formats, please make sure you've applied the patch accompanied with |
| 22 | +this tool. |
| 23 | +3. Usage of pg_passwd |
| 24 | +Supply the password file to the pg_passwd command. In the case described |
| 25 | +above, after ``cd'ing to $PGDATA, the following command execution specify |
| 26 | +the new password for pg_guest: |
| 27 | +% pg_passwd passwd |
| 28 | +Username: pg_guest |
| 29 | +Password: |
| 30 | +Re-enter password: |
| 31 | +where the Password: and Re-enter password: prompts require the same |
| 32 | +password input which are not displayed on the terminal. |
| 33 | +The original password file is renamed to ``passwd.bk''. |
| 34 | +4. How to specify pasasword authentication |
| 35 | +You can use the password authentication fro psq, perl, or pg{tcl,tk}sh. |
| 36 | +4.1 psql |
| 37 | +Use the -u option. Note that the original distribution includes a bug. |
| 38 | +Please make sure you've applied the patch distributed with this tool. |
| 39 | +The following lines show the sample usage of the option: |
| 40 | +% psql -h hyalos -u unv |
| 41 | +Username: pg_guest |
| 42 | +Password: |
| 43 | +Welcome to the POSTGRESQL interactive sql monitor: |
| 44 | + Please read the file COPYRIGHT for copyright terms of POSTGRESQL |
| 45 | + type \? for help on slash commands |
| 46 | + type \q to quit |
| 47 | + type \g or terminate with semicolon to execute query |
| 48 | + You are currently connected to the database: unv |
| 49 | +unv=> |
| 50 | +4.2 perl5 |
| 51 | +Use the new style of the Pg.pm like this |
| 52 | +$conn = Pg::connectdb("host=hyalos authtype=password dbname=unv |
| 53 | + user=pg_guest password=xxxxxxx"); |
| 54 | +For more details, the users refer to to ``src/pgsql_perl5/Pg.pm''. |
| 55 | +4.3 pg{tcl,tk}sh |
| 56 | +Use the pg_connect comamnd with -conninfo option thus |
| 57 | +% set conn [pg_connect -conninfo \ |
| 58 | + "host=hyalos authtype=password dbname=unv \ |
| 59 | + user=pg_guest password=xxxxxxx "] |
| 60 | +Use can list all of the keys for the option by executing the following |
| 61 | +command: |
| 62 | +% puts [ pg_conndefaults] |
| 63 | +5. Acknowledgment |
| 64 | +Mr. Ishii, SRA, pointed out the original bugs in the tool. He also |
| 65 | +supplied the Makefile for this distribution. |
| 66 | +------------------------------------------------------------------------- |
| 67 | +July 2, 1997 |
| 68 | +Yoshihiko Ichikawa, Dept of Info Sci, Fac of Sci, Ochanomizu University |
| 69 | +E-mail: ichikawa@is.ocha.ac.jp |
| 70 | + |
| 71 | +PostgreSQL Data Base Management System (formerly known as Postgres, then |
| 72 | +as Postgres95). |
| 73 | + |
| 74 | +This directory contains the version 6.1 release of the PostgreSQL |
| 75 | +database server. The server is not ANSI SQL compliant, but it gets |
| 76 | +closer with every release. After you unzip and untar the distribution |
| 77 | +file, look at file INSTALL for the installation notes and file HISTORY |
| 78 | +for the changes. |
| 79 | + |
| 80 | +The latest version of this software may be obtained at |
| 81 | +ftp://ftp.postgresql.org/pub/. For more information look at our WWW |
| 82 | +home page located at http://www.postgreSQL.org/. |
| 83 | + |
| 84 | +PostgreSQL is not public domain software. It is copyrighted by the |
| 85 | +University of California but may be used according to the licensing |
| 86 | +terms of the the copyright below: |
| 87 | + |
| 88 | +------------------------------------------------------------------------ |
| 89 | + |
| 90 | +POSTGRES95 Data Base Management System (formerly known as Postgres, then |
| 91 | +as Postgres95). |
| 92 | + |
| 93 | +Copyright (c) 1994-7 Regents of the University of California |
| 94 | + |
| 95 | +Permission to use, copy, modify, and distribute this software and its |
| 96 | +documentation for any purpose, without fee, and without a written agreement |
| 97 | +is hereby granted, provided that the above copyright notice and this |
| 98 | +paragraph and the following two paragraphs appear in all copies. |
| 99 | + |
| 100 | +IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR |
| 101 | +DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING |
| 102 | +LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS |
| 103 | +DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE |
| 104 | +POSSIBILITY OF SUCH DAMAGE. |
| 105 | + |
| 106 | +THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, |
| 107 | +INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY |
| 108 | +AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS |
| 109 | +ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO |
| 110 | +PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. |
| 111 | + |
0 commit comments