<!--
-$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.17 2001/05/02 14:46:33 momjian Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/ref/createuser.sgml,v 1.18 2001/08/25 17:46:11 momjian Exp $
Postgres documentation
-->
</listitem>
</varlistentry>
+ <varlistentry>
+ <term>--encrypted</term>
+ <listitem>
+ <para>
+ Encrypts the user's password stored in the database. If not
+ specified, the default is used.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
+ <term>--unencrypted</term>
+ <listitem>
+ <para>
+ Does not encrypt the user's password stored in the database. If
+ not specified, the default is used.
+ </para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term><replaceable class="parameter">username</replaceable></term>
<listitem>
#
#
# IDENTIFICATION
-# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.17 2001/02/18 18:34:01 momjian Exp $
+# $Header: /cvsroot/pgsql/src/bin/scripts/Attic/createuser,v 1.18 2001/08/25 17:46:11 momjian Exp $
#
# Note - this should NOT be setuid.
#
PwPrompt=
Password=
PSQLOPT=
+Encrypted= # blank uses default
# Check for echo -n vs echo \c
--sysid=*)
SysID=`echo "$1" | sed 's/^--sysid=//'`
;;
+ --encrypted)
+ Encrypted=t
+ ;;
+ --unencrypted)
+ Encrypted=f
+ ;;
-i*)
SysID=`echo "$1" | sed 's/^-i//'`
;;
[ "$CanCreateDb" = f ] && QUERY="$QUERY NOCREATEDB"
[ "$CanAddUser" = t ] && QUERY="$QUERY CREATEUSER"
[ "$CanAddUser" = f ] && QUERY="$QUERY NOCREATEUSER"
+[ "$Encrypted" = t ] && QUERY="$QUERY ENCRYPTED"
+[ "$Encrypted" = f ] && QUERY="$QUERY UNENCRYPTED"
${PATHNAME}psql -c "$QUERY" -d template1 $PSQLOPT
if [ $? -ne 0 ]; then