File: pg_passwd.1.html

package info (click to toggle)
mpsql 2.0-2
  • links: PTS
  • area: non-free
  • in suites: slink
  • size: 2,912 kB
  • ctags: 5,665
  • sloc: ansic: 34,322; makefile: 3,525; sh: 17
file content (109 lines) | stat: -rw-r--r-- 4,048 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!-- manual page source format generated by PolyglotMan v3.0.4, -->
<!-- available via anonymous ftp from ftp.cs.berkeley.edu:/ucb/people/phelps/tcltk/rman.tar.Z -->

<HTML>
<HEAD>
<TITLE>PG_PASSWD(UNIX) manual page</TITLE>
</HEAD>
<BODY>
<A HREF="pgsql.html">PostgreSQL Contents</A>
 
<H2><A NAME="sect0" HREF="#toc0">NAME </A></H2>
pg_passwd - manipulate the flat password file  
<H2><A NAME="sect1" HREF="#toc1">SYNOPSIS </A></H2>
<B>pg_passwd 
password_file</B>  
<H2><A NAME="sect2" HREF="#toc2">DESCRIPTION </A></H2>
<I>Pg_passwd</I> is a tool to manipulate the flat 
password file functionality of PostgreSQL. Specify the password file in 
the same style of Ident authentication in <I>$PGDATA/pg_hba.conf</I>: <P>
 <tt> </tt><tt> </tt>host  unv 
    133.65.96.250   255.255.255.255 password passwd <BR>
 <P>
 The above line allows 
access from 133.65.96.250 using the passwords listed in <I>$PGDATA/passwd</I>. The 
format of the password file follows those of <I>/etc/passwd</I> and <I>/etc/shadow</I>. 
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: <P>
 <tt> </tt><tt> </tt>pg_guest:/nB7.w5Auq.BY:10031:::::: 
<BR>
 <tt> </tt><tt> </tt>pg_guest:/nB7.w5Auq.BY:93001:930::/home/guest:/bin/tcsh <BR>
 <tt> </tt><tt> </tt>pg_guest:/nB7.w5Auq.BY:93001 
<BR>
 <P>
 Supply the password file to the pg_passwd command. In the case described 
above, after  <I>cd</I>'ing to $PGDATA, the following command execution specify 
the new password for pg_guest: <P>
 <tt> </tt><tt> </tt>% pg_passwd passwd <BR>
 <tt> </tt><tt> </tt>Username: pg_guest 
<BR>
 <tt> </tt><tt> </tt>Password: <BR>
 <tt> </tt><tt> </tt>Re-enter password: <BR>
 <P>
 where the <I>Password:</I> and <I>Re-enter password:</I> 
prompts require the same password input which are not displayed on the 
terminal. The original password file is renamed to <B>passwd.bk</B>. <P>
<B>Psql authentication</B> 
uses the  <B>-u</B> option. The following lines show the sample usage of the option: 
<P>
 <tt> </tt><tt> </tt>% psql -h hyalos -u unv <BR>
 <tt> </tt><tt> </tt>Username: pg_guest <BR>
 <tt> </tt><tt> </tt>Password: <BR>
 <tt> </tt><tt> </tt>Welcome to the 
POSTGRESQL interactive sql monitor: <BR>
 <tt> </tt><tt> </tt>  Please read the file COPYRIGHT 
for copyright terms of POSTGRESQL <BR>
 <tt> </tt><tt> </tt>   type \? for help on slash commands 
<BR>
 <tt> </tt><tt> </tt>   type \q to quit <BR>
 <tt> </tt><tt> </tt>   type \g or terminate with semicolon to execute query 
<BR>
 <tt> </tt><tt> </tt> You are currently connected to the database: unv <BR>
 <tt> </tt><tt> </tt>unv=&gt; <BR>
 <P>
 <B>Perl5 authentication</B> 
uses the new style of the Pg.pm like this: <P>
 <tt> </tt><tt> </tt>$conn = Pg::connectdb("host=hyalos 
dbname=unv <BR>
 <tt> </tt><tt> </tt>                       user=pg_guest password=xxxxxxx"); <BR>
 
<P>
 For more details, refer to  <I>src/pgsql_perl5/Pg.pm</I>. <P>
<B>Pg{tcl,tk}sh authentication</B> 
uses the <I>pg_connect</I> command with the <I>-conninfo</I> option thus: <P>
 <tt> </tt><tt> </tt>% set conn 
[pg_connect -conninfo \ <BR>
 <tt> </tt><tt> </tt>        "host=hyalos dbname=unv \ <BR>
 <tt> </tt><tt> </tt>         user=pg_guest 
password=xxxxxxx "] <BR>
 <P>
 Use can list all of the keys for the option by executing 
the following command: <P>
 <tt> </tt><tt> </tt>% puts [ pg_conndefaults] <BR>
 <P>
  
<H2><A NAME="sect3" HREF="#toc3">FILES </A></H2>

<DL>

<DT>$PGDATA/pg_hba.conf 
 </DT>
<DD>The Host Based Authentication file </DD>
</DL>
 
<H2><A NAME="sect4" HREF="#toc4">SEE ALSO </A></H2>
<A HREF="psql.1.html">psql(1)</A>
. <P>
 <P>

<HR><P>
<A NAME="toc"><B>Table of Contents</B></A><P>
<UL>
<LI><A NAME="toc0" HREF="#sect0">NAME</A></LI>
<LI><A NAME="toc1" HREF="#sect1">SYNOPSIS</A></LI>
<LI><A NAME="toc2" HREF="#sect2">DESCRIPTION</A></LI>
<LI><A NAME="toc3" HREF="#sect3">FILES</A></LI>
<LI><A NAME="toc4" HREF="#sect4">SEE ALSO</A></LI>
</UL>
</BODY></HTML>