To create a user joe on the default database server with prompting for some additional attributes: $ createuser -interactive joe Shall the new role be a superuser? (y/n) n Shall the new role be allowed to create databases? (y/n) n Shall the new role be allowed to create more new roles? (y/n) n To create a user joe on the default database server: $ createuser joe In some cases it is worth typing -W to avoid the extra connection attempt. However, createuser will waste a connection attempt finding out that the server wants a password. This option is never essential, since createuser will automatically prompt for a password if the server demands password authentication. Wįorce createuser to prompt for a password (for connecting to the server, not for the password of the new user). This option can be useful in batch jobs and scripts where no user is present to enter a password. pgpass file, the connection attempt will fail. If the server requires password authentication and a password is not available by other means such as a. User name to connect as (not the user name to create). Specifies the TCP port or local Unix domain socket file extension on which the server is listening for connections. If the value begins with a slash, it is used as the directory for the Unix domain socket. Specifies the host name of the machine on which the server is running. Show help about createuser command line arguments, and exit.Ĭreateuser also accepts the following command-line arguments for connection parameters: The new user will not have the REPLICATION privilege, which is described more fully in the documentation for CREATE ROLE. The new user will have the REPLICATION privilege, which is described more fully in the documentation for CREATE ROLE. The new user will not be allowed to create new roles. See role creation for more details about what capabilities are conferred by this privilege. The new user will be allowed to create, alter, drop, comment on, change the security label for, and grant or revoke membership in other roles that is, this user will have CREATEROLE privilege. This is not necessary if you do not plan on using password authentication. If given, createuser will issue a prompt for the password of the new user. (A role without login privilege is still useful as a means of managing database permissions.) -P The new user will not be allowed to log in. The new user will be allowed to log in (that is, the user name can be used as the initial session user identifier). (This was the default behavior up to PostgreSQL 9.1.) -l Prompt for the user name if none is specified on the command line, and also prompt for whichever of the options -d/ -D, -r/ -R, -s/ -S is not specified on the command line. The new role will not automatically inherit privileges of roles it is a member of. The new role will automatically inherit privileges of roles it is a member of. Multiple roles to which this role will be added as a member can be specified by writing multiple -g switches. Indicates role to which this role will be added immediately as a new member. This option is obsolete but still accepted for backward compatibility. eĮcho the commands that createuser generates and sends to the server. The new user will not be allowed to create databases. The new user will be allowed to create databases. Set a maximum number of connections for the new user. This name must be different from all existing roles in this PostgreSQL installation. Specifies the name of the PostgreSQL user to be created.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |