Home Explore Blog CI



postgresql

3rd chunk of `doc/src/sgml/ref/createuser.sgml`
5615af5151f1d4b8b85e465b378d012c4653cb4905b4ee040000000100000fa0

      <term><option>--interactive</option></term>
      <listitem>
       <para>
        Prompt for the user name if none is specified on the command line, and
        also prompt for whichever of the options
        <option>-d</option>/<option>-D</option>,
        <option>-r</option>/<option>-R</option>,
        <option>-s</option>/<option>-S</option> is not specified on the command
        line.  (This was the default behavior up to PostgreSQL 9.1.)
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-l</option></term>
      <term><option>--login</option></term>
      <listitem>
       <para>
        The new user will be allowed to log in (that is, the user name
        can be used as the initial session user identifier).
        This is the default.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-L</option></term>
      <term><option>--no-login</option></term>
      <listitem>
       <para>
        The new user will not be allowed to log in.
        (A role without login privilege is still useful as a means of
        managing database permissions.)
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-m <replaceable class="parameter">role</replaceable></option></term>
      <term><option>--with-member=<replaceable class="parameter">role</replaceable></option></term>
      <listitem>
       <para>
        Specifies an existing role that will be automatically
        added as a member of the new role. Multiple existing roles can
        be specified by writing multiple <option>-m</option> switches.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-P</option></term>
      <term><option>--pwprompt</option></term>
      <listitem>
       <para>
       If given, <application>createuser</application> will issue a prompt for
       the password of the new user. This is not necessary if you do not plan
       on using password authentication.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-r</option></term>
      <term><option>--createrole</option></term>
      <listitem>
       <para>
        The new user will be allowed to create, alter, drop, comment on,
        change the security label for other roles; that is,
        this user will have <literal>CREATEROLE</literal> privilege.
        See <xref linkend="role-creation"/> for more details about what
        capabilities are conferred by this privilege.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-R</option></term>
      <term><option>--no-createrole</option></term>
      <listitem>
       <para>
        The new user will not be allowed to create new roles.  This is the
        default.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-s</option></term>
      <term><option>--superuser</option></term>
      <listitem>
       <para>
        The new user will be a superuser.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-S</option></term>
      <term><option>--no-superuser</option></term>
      <listitem>
       <para>
        The new user will not be a superuser.  This is the default.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
      <term><option>-v <replaceable class="parameter">timestamp</replaceable></option></term>
      <term><option>--valid-until=<replaceable class="parameter">timestamp</replaceable></option></term>
      <listitem>
       <para>
        Set a date and time after which the role's password is no longer valid.
        The default is to set no password expiry date.
       </para>
      </listitem>
     </varlistentry>

     <varlistentry>
       <term><option>-V</option></term>
       <term><option>--version</option></term>
       <listitem>
       <para>
      

Title: createuser Options (Continued)
Summary
This section continues describing options for the `createuser` command, including interactive prompts, allowing/disallowing login, specifying roles to add to the new role, prompting for a password, granting/revoking the ability to create roles, granting/revoking superuser status, and setting a password expiration date.