※This sample exam is different from those that appear in the actual OSS-DB Exam.
The createuser command is an OS command that can connect to a PostgreSQL instance from the OS command line and create a new database user.
The connection destination database cluster is specified by a combination of the command line option - h (or - host) and - p (or - port), and the user name when connecting is specified by - U (or - user name). When these are omitted, default values determined by environment variables etc. are used.
You can run createuser even if it is not necessarily on the same server, as long as the connection destination database is running on the host specified with the -h option. Also, as long as the database user to be connected has superuser or CREATEROLE privilege, it is not necessary to run as the same user as the server process.
The method of user authentication when connecting to a database varies depending on the environment, but if you can not connect with a user with CREATEROLE privilege, you can not execute the createuser command.
The user name of the database user to be created can be used regardless of the OS user name.
Therefore, the correct answers are C and E.