Skip to content
Snippets Groups Projects
Commit 13920423 authored by Tom Lane's avatar Tom Lane
Browse files

Point out that --adduser actually makes the new user a superuser. This

was mentioned on the man page for the underlying CREATE USER command,
but it should be explained here too.
parent a164407b
No related branches found
No related tags found
No related merge requests found
<!-- <!--
$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.23 2002/01/20 22:19:56 petere Exp $ $Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.24 2002/02/13 19:32:17 tgl Exp $
PostgreSQL documentation PostgreSQL documentation
--> -->
...@@ -79,7 +79,7 @@ PostgreSQL documentation ...@@ -79,7 +79,7 @@ PostgreSQL documentation
<term>-d, --createdb</term> <term>-d, --createdb</term>
<listitem> <listitem>
<para> <para>
Allows the new user to create databases. The new user is allowed to create databases.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -88,7 +88,7 @@ PostgreSQL documentation ...@@ -88,7 +88,7 @@ PostgreSQL documentation
<term>-D, --no-createdb</term> <term>-D, --no-createdb</term>
<listitem> <listitem>
<para> <para>
Forbids the new user to create databases. The new user is not allowed to create databases.
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -97,7 +97,9 @@ PostgreSQL documentation ...@@ -97,7 +97,9 @@ PostgreSQL documentation
<term>-a, --adduser</term> <term>-a, --adduser</term>
<listitem> <listitem>
<para> <para>
Allows the new user to create other users. The new user is allowed to create other users.
(Note: actually, this makes the new user a <firstterm>superuser</>.
The option is poorly named.)
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -106,7 +108,8 @@ PostgreSQL documentation ...@@ -106,7 +108,8 @@ PostgreSQL documentation
<term>-A, --no-adduser</term> <term>-A, --no-adduser</term>
<listitem> <listitem>
<para> <para>
Forbids the new user to create other users. The new user is not allowed to create other users (i.e.,
the new user is a regular user not a superuser).
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
...@@ -215,9 +218,17 @@ PostgreSQL documentation ...@@ -215,9 +218,17 @@ PostgreSQL documentation
<para> <para>
<application>createuser</application> creates a <application>createuser</application> creates a
new <productname>PostgreSQL</productname> user. new <productname>PostgreSQL</productname> user.
Only users with <literal>usesuper</literal> set in Only superusers (users with <literal>usesuper</literal> set in
the <literal>pg_shadow</literal> table can create the <literal>pg_shadow</literal> table) can create
new <productname>PostgreSQL</productname> users. new <productname>PostgreSQL</productname> users,
so <application>createuser</application> must be
invoked by someone who is a <productname>PostgreSQL</productname>
superuser.
</para>
<para>
Being a superuser also implies the ability to bypass access permission
checks within the database, so superuser-dom should not be granted lightly.
</para> </para>
<para> <para>
...@@ -227,10 +238,11 @@ PostgreSQL documentation ...@@ -227,10 +238,11 @@ PostgreSQL documentation
the <productname>PostgreSQL</productname> interactive terminal the <productname>PostgreSQL</productname> interactive terminal
<xref linkend="APP-PSQL">. Thus, there is nothing <xref linkend="APP-PSQL">. Thus, there is nothing
special about creating users via this or other methods. This means special about creating users via this or other methods. This means
that the <application>psql</application> must be found by the script and that that the <application>psql</application> application must be found by the
a database server is running at the targeted host. Also, any default script and that
settings and environment variables available to <application>psql</application> a database server must be running at the targeted host. Also, any default
and the <application>libpq</application> front-end library do apply. settings and environment variables used by <application>psql</application>
and the <application>libpq</application> front-end library will apply.
</para> </para>
</refsect1> </refsect1>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment