Options (6)
-s, --superuserbooleanCreate a superuser
Example:
createuser {{[-s|--superuser]}} {{username}}-d, --createdbbooleanCreate a user allowed to create databases, manage roles, and prompt for a password
Example:
createuser {{[-d|--createdb]}} {{[-r|--createrole]}} {{[-P|--pwprompt]}} {{username}}-r, --createrolebooleanCreate a user allowed to create databases, manage roles, and prompt for a password
Example:
createuser {{[-d|--createdb]}} {{[-r|--createrole]}} {{[-P|--pwprompt]}} {{username}}-P, --pwpromptbooleanCreate a user allowed to create databases, manage roles, and prompt for a password
Example:
createuser {{[-d|--createdb]}} {{[-r|--createrole]}} {{[-P|--pwprompt]}} {{username}}-D, --no-createdbbooleanCreate a user without the ability to create databases or manage roles
Example:
createuser {{[-D|--no-createdb]}} {{[-R|--no-createrole]}} {{username}}-R, --no-createrolebooleanCreate a user without the ability to create databases or manage roles
Example:
createuser {{[-D|--no-createdb]}} {{[-R|--no-createrole]}} {{username}}Examples (5)
Create a user interactively
createuser --interactive usernameCreate a user with no special rights
createuser usernameCreate a superuser
createuser [-s|--superuser] usernameCreate a user allowed to create databases, manage roles, and prompt for a password
createuser [-d|--createdb] [-r|--createrole] [-P|--pwprompt] usernameCreate a user without the ability to create databases or manage roles
createuser [-D|--no-createdb] [-R|--no-createrole] usernamemade by @shridhargupta | data from tldr-pages