Create new role - postgresql on ubuntu

0 votes
I've installed postgresql on ubuntu. Now how do I create a new role?
Mar 22, 2019 in Database by Manoj
1,028 views

1 answer to this question.

0 votes

If you are logged in as the postgres account, you can create a new user by typing:

createuser --interactive

If, instead, you prefer to use sudo for each command without switching from your normal account, type:

sudo -u postgres createuser --interactive

The script will prompt you with some choices and, based on your responses, execute the correct Postgres commands to create a user to your specifications.

Output

Enter name of role to add: danny Shall the new role be a superuser? (y/n) y

answered Mar 22, 2019 by Danny

Related Questions In Database

0 votes
1 answer

What are the prerequisites to install PostgreSQL on Ubuntu?

Before you start installing postgreSQL, make sure ...READ MORE

answered Mar 22, 2019 in Database by Manoj
837 views
0 votes
0 answers

How to install Oracle DB on ubuntu?

Can anyone help me with the step ...READ MORE

Feb 28, 2019 in Database by Sukanya Rajput
769 views
0 votes
1 answer

Install MS SQL on Ubuntu

Hey @Kavita, follow these steps to install ...READ MORE

answered Mar 1, 2019 in Database by Kali
625 views
0 votes
1 answer

How do i install MongoDB on ubuntu?

Hey @Aryaa, follow these steps: Import Public Key sudo ...READ MORE

answered Mar 15, 2019 in Database by Avinash
918 views
0 votes
1 answer
0 votes
2 answers

Install postgreSQL on Ubuntu

Follow the below commands to install PostgreSQL (PSQL) ...READ MORE

answered Nov 12, 2020 in Database by Prachi
• 140 points
1,307 views
0 votes
1 answer

Access progrs prompt without switching accounts

Use the following to get the postgres prompt ...READ MORE

answered Mar 22, 2019 in Database by Mahi
858 views
0 votes
1 answer

How do I set variable if a specific package version is installed in CFEngine?

Here is what you can do.Just use packagesmatching to ...READ MORE

answered Jul 12, 2018 in Other DevOps Questions by Atul
• 10,240 points
1,210 views
0 votes
1 answer

How to install MySQL in Ubuntu?

To install MySQL on ubuntu you have ...READ MORE

answered Feb 28, 2019 in Database by Priyaj
• 58,020 points
1,265 views
0 votes
1 answer

How to install Oracle DB on Windows?

Installing Oracle DB is pretty easy wrt other ...READ MORE

answered Feb 28, 2019 in Database by Priyaj
• 58,020 points
1,514 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP