Computer Science


PG_PASSWD(1)                                         PG_PASSWD(1)

NAME
       pg_passwd - Manipulate the flat password file

SYNOPSIS
       pg_passwd filename

DESCRIPTION
       pg_passwd  is  a tool to manipulate the flat password file
       functionality of Postgres. This style of password  authen-
       tication is not required in an installation, but is one of
       several supported security mechanisms.

       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

       where  the  above  line  allows  access from 133.65.96.250
       using the passwords listed in $PGDATA/passwd.  The  format
       of  the  password  file  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 com-
       pletely 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

       Supply the password file to the pg_passwd command.  In the
       case described above, after changing the working directory
       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.

       psql  uses the -u option to invoke this style of authenti-
       cation.

       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=>

       Perl5 authentication uses the new style of the Pg.pm  like
       this:

       $conn = Pg::connectdb("host=hyalos dbname=unv
                              user=pg_guest password=xxxxxxx");

       For more details, refer to src/interfaces/perl5/Pg.pm.

       Pg{tcl,tk}sh  authentication  uses  the pg_connect command
       with the -conninfo option thusly:

       % set conn [pg_connect -conninfo \\
                   "host=hyalos dbname=unv \\
                    user=pg_guest password=xxxxxxx "]

       You can list all of the keys for the option  by  executing
       the following command:

       % puts [ pg_conndefaults]

Application               15 August 1999                        1

Back to the index


Apply now!


Handbook

Postgraduate study options

Computer Science Blog



Please give us your feedback or ask us a question

This message is...


My feedback or question is...


My email address is...

(Only if you need a reply)

A to Z Directory | Site map | Accessibility | Copyright | Privacy | Disclaimer | Feedback on this page