I'd like to switch between the default user in Terminal and the user 'postgres', created when I installed PostgreSQL 9.2.
If I type su postgres
, I'm prompted for a password that I don't know and don't remember ever setting. I try the root password and it doesn't work.
If I type sudo su postgres
, I'm prompted for my root password, which I enter, and that works.
But now, if I try to switch back to the default user using sudo su user
, I'm prompted for a password, and the root password does not work. Neither does the password I use to log into that user in OSX.
I don't understand what's going on here--I've only ever set one password, but the only context in which it seems to work is when switching from the normal user to 'postgres'. What's going on and how can I fix it?
root
user forsudo su postgres
? If yes, how did you set this in the first place?