|
| 1 | +.\" This is -*-nroff-*- |
| 2 | +.\" XXX standard disclaimer belongs here.... |
| 3 | +.\" $Header: /cvsroot/pgsql/src/man/Attic/pg_passwd.1,v 1.1 1997/09/21 04:54:36 momjian Exp $ |
| 4 | +.TH PG_PASSWD UNIX 11/05/95 PostgreSQL PostgreSQL |
| 5 | +.SH NAME |
| 6 | +pg_passwd \(em manipulate the flat password file |
| 7 | +.SH SYNOPSIS |
| 8 | +.BR "pg_passwd password_file" |
| 9 | +.SH DESCRIPTION |
| 10 | +.IR Pg_passwd |
| 11 | +is a tool to manipulate the |
| 12 | +flat password file functionality of PostgreSQL. |
| 13 | +Specify the password file in the same style of Ident authentication in |
| 14 | +.IR $PGDATA/pg_hba.conf : |
| 15 | +.nf |
| 16 | + |
| 17 | + host unv 133.65.96.250 255.255.255.255 password passwd |
| 18 | + |
| 19 | +.fi |
| 20 | +The above line allows access from 133.65.96.250 using the passwords listed |
| 21 | +in |
| 22 | +.IR $PGDATA/passwd . |
| 23 | +The format of the password file follows those of |
| 24 | +.IR /etc/passwd |
| 25 | +and |
| 26 | +.IR /etc/shadow . |
| 27 | +The first field is the user name, and the second field |
| 28 | +is the encrypted password. |
| 29 | +The rest is completely ignored. |
| 30 | +Thus the following three sample lines specify the same user and password pair: |
| 31 | +.nf |
| 32 | + |
| 33 | + pg_guest:/nB7.w5Auq.BY:10031:::::: |
| 34 | + pg_guest:/nB7.w5Auq.BY:93001:930::/home/guest:/bin/tcsh |
| 35 | + pg_guest:/nB7.w5Auq.BY:93001 |
| 36 | + |
| 37 | +.fi |
| 38 | +Supply the password file to the pg_passwd command. |
| 39 | +In the case described above, after |
| 40 | +.IR cd "'ing" |
| 41 | +to $PGDATA, the following command execution specify |
| 42 | +the new password for pg_guest: |
| 43 | +.nf |
| 44 | + |
| 45 | + % pg_passwd passwd |
| 46 | + Username: pg_guest |
| 47 | + Password: |
| 48 | + Re-enter password: |
| 49 | + |
| 50 | +.fi |
| 51 | +where the |
| 52 | +.IR Password: |
| 53 | +and |
| 54 | +.IR "Re-enter password:" |
| 55 | +prompts require the same password input which are not displayed |
| 56 | +on the terminal. |
| 57 | +The original password file is renamed to |
| 58 | +.BR "passwd.bk" . |
| 59 | +.PP |
| 60 | +.BR "Psql authentication" |
| 61 | +uses the |
| 62 | +.BR -u |
| 63 | +option. |
| 64 | +The following lines show the sample usage of the option: |
| 65 | +.nf |
| 66 | + |
| 67 | + % psql -h hyalos -u unv |
| 68 | + Username: pg_guest |
| 69 | + Password: |
| 70 | + Welcome to the POSTGRESQL interactive sql monitor: |
| 71 | + Please read the file COPYRIGHT for copyright terms of POSTGRESQL |
| 72 | + type \\? for help on slash commands |
| 73 | + type \\q to quit |
| 74 | + type \\g or terminate with semicolon to execute query |
| 75 | + You are currently connected to the database: unv |
| 76 | + unv=> |
| 77 | + |
| 78 | +.fi |
| 79 | +.BI "Perl5 authentication" |
| 80 | +uses the new style of the Pg.pm like this: |
| 81 | +.nf |
| 82 | + |
| 83 | + $conn = Pg::connectdb("host=hyalos authtype=password dbname=unv |
| 84 | + user=pg_guest password=xxxxxxx"); |
| 85 | + |
| 86 | +.fi |
| 87 | +For more details, refer to |
| 88 | +.IR src/pgsql_perl5/Pg.pm . |
| 89 | +.PP |
| 90 | +.BR "Pg{tcl,tk}sh authentication" |
| 91 | +uses the |
| 92 | +.IR pg_connect |
| 93 | +command with the |
| 94 | +.IR -conninfo |
| 95 | +option thus: |
| 96 | +.nf |
| 97 | + |
| 98 | + % set conn [pg_connect -conninfo \\ |
| 99 | + "host=hyalos authtype=password dbname=unv \\ |
| 100 | + user=pg_guest password=xxxxxxx "] |
| 101 | + |
| 102 | +.fi |
| 103 | +Use can list all of the keys for the option by executing the following |
| 104 | +command: |
| 105 | +.nf |
| 106 | + |
| 107 | + % puts [ pg_conndefaults] |
| 108 | + |
| 109 | +.fi |
| 110 | +.SH FILES |
| 111 | +.TP 5n |
| 112 | +$PGDATA/pg_hba.conf |
| 113 | +The Host Based Authentication file |
| 114 | +.SH "SEE ALSO" |
| 115 | +psql(1). |
| 116 | + |
0 commit comments