Skip to content

Instantly share code, notes, and snippets.

@omkz
Created December 18, 2020 15:27
Show Gist options
  • Save omkz/e0fe5512429969d47eccbcca51bdfb72 to your computer and use it in GitHub Desktop.
Save omkz/e0fe5512429969d47eccbcca51bdfb72 to your computer and use it in GitHub Desktop.
Create the same postgres user as the linux user

First, switch to the postgres system user account

sudo su - postgres

To create a user, type the following command(Enter the same user and password as the Linux user)

createuser --interactive --pwprompt

Bonus: Show user

\du

delete user

drop user user_name;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment