createuser man page on BSDOS

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDOS logo
[printable version]

CREATEUSER(1)		PostgreSQL Client Applications		 CREATEUSER(1)

NAME
       createuser - Create a new Postgres user

SYNOPSIS
       createuser [ options... ] [ username ]

   INPUTS
       -h, --host host
	      Specifies the hostname of the machine on which the postmaster is
	      running. If host begins with a slash, it is used as  the	direc‐
	      tory for the unix domain socket.

       -p, --port port
	      Specifies	 the  Internet TCP/IP port or local Unix domain socket
	      file extension on which the postmaster is listening for  connec‐
	      tions.

       -e, --echo
	      Echo  the queries that createdb generates and sends to the back‐
	      end.

       -q, --quiet
	      Do not display a response.

       -d, --createdb
	      Allows the new user to create databases.

       -D, --no-createdb
	      Forbids the new user to create databases.

       -a, --adduser
	      Allows the new user to create other users.

       -A, --no-adduser
	      Forbids the new user to create other users.

       -P, --pwprompt
	      If given, createuser will issue a prompt for the password of the
	      new  user.  This	is  not	 necessary if you do not plan on using
	      password authentication.

       -i, --sysid uid
	      Allows you to pick a non-default user id for the new user.  This
	      is not necessary, but some people like it.

       username
	      Specifies	 the  name  of	the Postgres user to be created.  This
	      name must be unique among all Postgres users.

       You will be prompted for a name and other missing information if it  is
       not specified on the command line.

       The  options  -h,  -p,  and -e, are passed on literally to psql(1). The
       psql options -U and -W are available as well, but their use can be con‐
       fusing in this context.

   OUTPUTS
       CREATE USER
	      All is well.

       createuser: creation of user "username" failed
	      Something went wrong. The user was not created.

       If  there is an error condition, the backend error message will be dis‐
       played.	See CREATE USER [create_user(l)] and  psql(1)  for  possibili‐
       ties.

DESCRIPTION
       createuser  creates  a new Postgres user.  Only users with usesuper set
       in the pg_shadow table can create new Postgres users.

       createuser is a shell script wrapper around the SQL command CREATE USER
       [create_user(l)]	 via  the Postgres interactive terminal psql(1). Thus,
       there is nothing special about creating users via this or  other	 meth‐
       ods.  This  means  that the psql must be found by the script and that a
       database server is running at the targeted host. Also, any default set‐
       tings  and environment variables available to psql and the libpq front-
       end library do apply.

USAGE
       To create a user joe on the default database server:

       $ createuser joe
       Is the new user allowed to create databases? (y/n) n
       Shall the new user be allowed to create more new users? (y/n) n
       CREATE USER

       To create the same user joe using the postmaster	 on  host  eden,  port
       5000, avoiding the prompts and taking a look at the underlying query:

       $ createuser -p 5000 -h eden -D -A -e joe
       CREATE USER "joe" NOCREATEDB NOCREATEUSER
       CREATE USER

Application			  2000-11-11			 CREATEUSER(1)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server BSDOS

List of man pages available for BSDOS

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net