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 119 120
|
<!-- 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>DESTROYUSER(UNIX) manual page</TITLE>
</HEAD>
<BODY>
<A HREF="pgsql.html">PostgreSQL Contents</A>
<H2><A NAME="sect0" HREF="#toc0">NAME </A></H2>
destroyuser - destroy a Postgres user and associated databases
<H2><A NAME="sect1" HREF="#toc1">SYNOPSIS
</A></H2>
<B>destroyuser</B> [<B>-a</B> system] [<B>-h</B> host] [<B>-p</B> port] [username]
<H2><A NAME="sect2" HREF="#toc2">DESCRIPTION </A></H2>
<P>
<I>Destroyuser</I>
destroys an existing Postgres user and the databases for which that user
is database administrator. Only users with `usesuper' set in the `pg_user'
class can destroy new Postgres users. As shipped, the user `postgres' can
destroy users. <P>
<I>Destroyuser</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>destroyuser</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 destroyed. (The invoker will be prompted for a name if none is specified
on the command line.) <P>
<I>Destroyuser</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>
<P>
Once invoked with the above options, <I>destroyuser</I> will warn you
about the databases that will be destroyed in the process and permit you
to abort the removal of the user if desired.
<H2><A NAME="sect4" HREF="#toc4">SEE ALSO </A></H2>
<A HREF="createuser.1.html">createuser(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>Destroyuser</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 delete users.</B> </DT>
<DD>You do not have permission
to delete users; contact your Postgres site administrator. </DD>
<DT><B>user `</B><I>username</I><B>'
does not exist</B> </DT>
<DD>The user to be removed does not have an entry in the `pg_user'
class. </DD>
<DT><B>database access failed</B> </DT>
<DD></DD>
<DT><B>destroydb on</B><I> dbname</I><B> failed - exiting</B> </DT>
<DD></DD>
<DT><B>delete
of user</B><I> username</I><B> was UNSUCCESSFUL</B> </DT>
<DD>An internal error occurred in <I>psql</I>
or the backend server. Contact your Postgres site administrator to ensure
that the files and database entries associated with the user and his/her
associated databases are completely removed. </DD>
</DL>
<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>
</UL>
</BODY></HTML>
|