Velvet Star Monitor

Standout celebrity highlights with iconic style.

updates

Switched to postgres user after PostgreSQL install, can't switch back to normal user

Writer Sophia Terry

I installed PostgreSQL using this guide:

It says that the install command created a Linux user postgres automatically. So I used

sudo -i -u postgres

to switch to postgres user It went well and I could then use

psql

command to be able to use SQL queries.

Now I want to go back to my normal user, but I can't.

I tried

sudo -i -u username

but it asks for postgres password. I have no idea what it is since I didn't set it. I simply used

sudo apt install postgresql postgresql-contrib

command to install PostgreSQL and it created the postgres user and set its password for me.

Why does it ask for postgres password and not for username password? How can I switch back to my normal user?

1

1 Answer

enter image description here

Use the command exit (two times) worked for me to get back to normal user. See following

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy