File: createuser.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 (118 lines) | stat: -rw-r--r-- 4,810 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
110
111
112
113
114
115
116
117
118
<!-- 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>CREATEUSER(UNIX) manual page</TITLE>
</HEAD>
<BODY>
<A HREF="pgsql.html">PostgreSQL Contents</A>
 
<H2><A NAME="sect0" HREF="#toc0">NAME </A></H2>
createuser - create a Postgres user  
<H2><A NAME="sect1" HREF="#toc1">SYNOPSIS </A></H2>
<B>createuser</B> [<B>-a</B> system] 
[<B>-h</B> host] [<B>-p</B> port] [username]  
<H2><A NAME="sect2" HREF="#toc2">DESCRIPTION </A></H2>
<I>Createuser</I> creates a new Postgres 
user.  Only users with `usesuper' set in the `pg_user' class can create new 
Postgres users.  As shipped, the user `postgres' can create users. <P>
<I>Createuser</I> 
is a shell script that invokes <I>psql</I>. Hence, a <I>postmaster</I> process must be 
running on the database server host before <I>createuser</I> is executed.  In 
addition, the <FONT SIZE=-1>PGOPTION</FONT>
 and <FONT SIZE=-1>PGREALM</FONT>
 environment variables will be passed 
on to <I>psql</I> and processed as described in  <I><A HREF="psql.1.html">psql</I>(1)</A>
. <P>
The optional argument 
<I>username</I> specifies the name of the Postgres user to be created.  (The invoker 
will be prompted for a name if none is specified on the command line.) 
This name must be unique among all Postgres users. <P>
<I>Createuser</I> understands 
the following command-line options: 
<DL>

<DT><B>-a</B> system  </DT>
<DD>Specifies an authentication 
system <I>system</I> (see  <I><A HREF="pgintro.1.html">pgintro</I>(1)</A>
) to use in connecting to the  <I>postmaster</I> 
process.  This option no longer has any effect. </DD>

<DT><B>-h</B> host  </DT>
<DD>Specifies the hostname 
of the machine on which the  <I>postmaster</I> is running.  Defaults to using 
local Unix domain sockets. </DD>

<DT><B>-p</B> port  </DT>
<DD>Specifies the TCP/IP port or local Unix 
domain socket file extension on which the <I>postmaster</I> is listening for 
connections.  Defaults to 5432, or the value of the <FONT SIZE=-1>PGPORT</FONT>
 environment 
variable (if set). </DD>
</DL>
 
<H2><A NAME="sect3" HREF="#toc3">INTERACTIVE QUESTIONS </A></H2>
Once invoked with the above options, 
<I>createuser</I> will ask a series of questions.  The new users's login name (if 
not given on the command line) and user-id must be specified.  (Note that 
the Postgres user-id must be the same as the user's Unix user-id.)  In addition, 
you must describe the security capabilities of the new user. Specifically, 
you will be asked whether the new user should be able to act as Postgres 
super-user, create new databases and update the system catalogs manually. 
 
<H2><A NAME="sect4" HREF="#toc4">SEE ALSO </A></H2>
<A HREF="destroyuser.1.html">destroyuser(1)</A>
, <A HREF="psql.1.html">psql(1)</A>
, <A HREF="postmaster.1.html">postmaster(1)</A>
.  
<H2><A NAME="sect5" HREF="#toc5">DIAGNOSTICS </A></H2>

<DL>

<DT><B>Error: Failed 
to connect to backend (host=</B><I>xxx</I><B>, port=</B><I>xxx</I><B>)</B>  </DT>
<DD><I>Createuser</I> could not attach 
to the  <I>postmaster</I> process on the specified host and port.  If you see 
this message, ensure that the <I>postmaster</I> is running on the proper host 
and that you have specified the proper port.  If your site uses an authentication 
system, ensure that you have obtained the required authentication credentials. 
</DD>

<DT><B>user `</B><I>username</I><B>' is not in `pg_user'</B>  </DT>
<DD>You do not have a valid entry in the 
relation `pg_user' and cannot do anything with Postgres at all; contact 
your Postgres site administrator. </DD>

<DT><I>username</I><B> cannot create users.</B>  </DT>
<DD>You do 
not have permission to create new users; contact your Postgres site administrator. 
</DD>

<DT><B>user `</B><I>username</I><B>' already exists</B>  </DT>
<DD>The user to be added already has an entry 
in the `pg_user' class. </DD>

<DT><B>database access failed</B>  </DT>
<DD>An internal error occurred 
in  <I>psql</I> or the backend server.  Ensure that your Postgres site administrator 
has properly installed Postgres and initialized the site with  <I>initdb</I>. 
</DD>
</DL>
 
<H2><A NAME="sect6" HREF="#toc6">BUGS </A></H2>
Postgres user-ids and user names should not have anything to do with 
the constraints of Unix. <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">INTERACTIVE QUESTIONS</A></LI>
<LI><A NAME="toc4" HREF="#sect4">SEE ALSO</A></LI>
<LI><A NAME="toc5" HREF="#sect5">DIAGNOSTICS</A></LI>
<LI><A NAME="toc6" HREF="#sect6">BUGS</A></LI>
</UL>
</BODY></HTML>