FATAL: role "user" does not exist [duplicate] - postgresql

I'm setting up my PostgreSQL 9.1. I can't do anything with PostgreSQL: can't createdb, can't createuser; all operations return the error message
Fatal: role h9uest does not exist
h9uest is my account name, and I sudo apt-get install PostgreSQL 9.1 under this account.
Similar error persists for the root account.

Use the operating system user postgres to create your database - as long as you haven't set up a database role with the necessary privileges that corresponds to your operating system user of the same name (h9uest in your case):
sudo -u postgres -i
As recommended here or here.
Then try again. Type exit when done with operating as system user postgres.
Or execute the single command createuser as postgres with sudo, like demonstrated by drees in another answer.
The point is to use the operating system user matching the database role of the same name to be granted access via ident authentication. postgres is the default operating system user to have initialized the database cluster. The manual:
In order to bootstrap the database system, a freshly initialized
system always contains one predefined role. This role is always a
“superuser”, and by default (unless altered when running initdb) it
will have the same name as the operating system user that initialized
the database cluster. Customarily, this role will be named postgres.
In order to create more roles you first have to connect as this
initial role.
I have heard of odd setups with non-standard user names or where the operating system user does not exist. You'd need to adapt your strategy there.
Read about database roles and client authentication in the manual.

After trying many other people's solutions, and without success, this answer finally helped me.
https://stackoverflow.com/a/16974197/2433309
In short, running
sudo -u postgres createuser owning_user
creates a role with name owning_user (in this case, h9uest). After that you can run rake db:create from the terminal under whatever account name you set up without having to enter into the Postgres environment.

sudo su - postgres
psql template1
creating role on pgsql with privilege as "superuser"
CREATE ROLE username superuser;
eg. CREATE ROLE demo superuser;
Then create user
CREATE USER username;
eg. CREATE USER demo;
Assign privilege to user
GRANT ROOT TO username;
And then enable login that user, so you can run e.g.: psql template1, from normal $ terminal:
ALTER ROLE username WITH LOGIN;

This works for me:
psql -h localhost -U postgres

Installing postgres using apt-get does not create a user role or a database.
To create a superuser role and a database for your personal user account:
sudo -u postgres createuser -s $(whoami); createdb $(whoami)

psql postgres
postgres=# CREATE ROLE username superuser;
postgres=# ALTER ROLE username WITH LOGIN;

For version Postgres 9.5 use following comand:
psql -h localhost -U postgres
Hope this will help.

Working method,
vi /etc/postgresql/9.3/main/pg_hba.conf
local all postgres peer
here change peer to trust
restart, sudo service postgresql restart
now try, psql -U postgres

For Windows users : psql -U postgres
You should see then the command-line interface to PostgreSQL: postgres=#

I did a healthcheck with docker-compose.
healthcheck:
test: ['CMD-SHELL', 'pg_isready']
interval: 5s
timeout: 5s
retries: 5
If you also have that change the user:
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U postgres'] # <<<---
interval: 5s
timeout: 5s
retries: 5

In local user prompt, not root user prompt, type
sudo -u postgres createuser <local username>
Then enter password for local user.
Then enter the previous command that generated "role 'username' does not exist."
Above steps solved the problem for me.
If not, please send terminal messages for above steps.

I installed it on macOS and had to:
cd /Applications/Postgres.app/Contents/Versions/9.5/bin
createuser -U postgres -s YOURUSERNAME
createdb YOURUSERNAME
Here's the source: https://github.com/PostgresApp/PostgresApp/issues/313#issuecomment-192461641

Manually creating a DB cluster solved it in my case.
For some reason, when I installed postgres, the "initial DB" wasn't created. Executing initdb did the trick for me.
This solution is provided in the PostgreSQL Wiki - First steps:
initdb
Typically installing postgres to your OS creates an "initial DB" and starts the postgres server daemon running. If not then you'll need to run initdb

dump and restore with --no-owner --no-privileges flags
e.g.
dump - pg_dump --no-owner --no-privileges --format=c --dbname=postgres://userpass:username#postgres:5432/schemaname > /tmp/full.dump
restore - pg_restore --no-owner --no-privileges --format=c --dbname=postgres://userpass:username#postgres:5432/schemaname /tmp/full.dump

sudo -u postgres createuser --superuser $USER
sudo -u postgres createdb $USER
This should definitely work for you.

for those who using docker and correctly followed the instructions from official doc, if you still met this problem, RESTART windows and try again.

Follow These Steps and it Will Work For You :
run msfconsole
type db_console
some information will be shown to you chose the information who tell you to make: db_connect user:pass#host:port.../database sorry I don't remember it but it's like this one then replace the user and the password and the host and the database with the information included in the database.yml in the emplacement: /usr/share/metasploit-framework/config
you will see. rebuilding the model cache in the background.
Type apt-get update && apt-get upgrade after the update restart the terminal and lunch msfconsole and it works you can check that by typing in msfconsole: msf>db_status you will see that it's connected.

Follow these steps to get postgres working.
In your terminal, locate the Application Support folder with the following command.
/Users/[name of the user]/library/application support
Delete the application, Postgres.
Reinstall the app and it should work just fine.

Something as simple as changing port from 5432 to 5433 worked for me.

Related

Postgres `createuser` command not working [duplicate]

I'm trying to set up Postgres for the first time, and I need to create a user with permissions to read and create databases. However, when I use:
createuser username
in my terminal I get the following message:
createuser: could not connect to database postgres: FATAL: role "tom" does not exist
Tom is my Ubuntu user account that I'm logged into right now. I'm trying to create a username of "postgres" then do a psql -U psql template1 so I can create a database and assign an owner to it for my Rails app.
You mentioned Ubuntu so I'm going to guess you installed the PostgreSQL packages from Ubuntu through apt.
If so, the postgres PostgreSQL user account already exists and is configured to be accessible via peer authentication for unix sockets in pg_hba.conf. You get to it by running commands as the postgres unix user, eg:
sudo -u postgres createuser owning_user
sudo -u postgres createdb -O owning_user dbname
This is all in the Ubuntu PostgreSQL documentation that's the first Google hit for "Ubuntu PostgreSQL" and is covered in numerous Stack Overflow questions.
(You've made this question a lot harder to answer by omitting details like the OS and version you're on, how you installed PostgreSQL, etc.)
See git gist with instructions here
Run this:
sudo -u postgres psql
OR
psql -U postgres
in your terminal to get into postgres
NB: If you're on a Mac and both of the commands above failed jump to the section about Mac below
postgres=#
Run
CREATE USER new_username;
Note: Replace new_username with the user you want to create, in your case that will be tom.
postgres=# CREATE USER new_username;
CREATE ROLE
Since you want that user to be able to create a DB, you need to alter the role to superuser
postgres=# ALTER USER new_username SUPERUSER CREATEDB;
ALTER ROLE
To confirm, everything was successful,
postgres=# \du
List of roles
Role name | Attributes | Member of
-----------+------------------------------------------------+-----------
new_username | Superuser, Create DB | {}
postgres | Superuser, Create role, Create DB, Replication | {}
root | Superuser, Create role, Create DB | {}
postgres=#
Update/Modification (For Mac):
I recently encountered a similar error on my Mac:
psql: FATAL: role "postgres" does not exist
This was because my installation was setup with a database superuser whose role name is the same as your login (short) name.
But some linux scripts assume the superuser has the traditional role name of postgres
How did I resolve this?
If you installed with homebrew run:
/usr/local/opt/postgres/bin/createuser -s postgres
If you're using a specific version of postgres, say 10.5 then run:
/usr/local/Cellar/postgresql/10.5/bin/createuser -s postgres
OR:
/usr/local/Cellar/postgresql/10.5/bin/createuser -s new_username
OR:
/usr/local/opt/postgresql#11/bin/createuser -s postgres
If you installed with postgres.app for Mac run:
/Applications/Postgres.app/Contents/Versions/10.5/bin/createuser -s postgres
P.S: replace 10.5 with your PostgreSQL version
sudo -u postgres createuser -s tom
this should help you as this will happen if the administrator has not created a PostgreSQL user account for you. It could also be that you were assigned a PostgreSQL user name that is different from your operating system user name, in that case you need to use the -U switch.
Your error is posted in the official documentation. You can read this article.
I have copied the reason for you (and hyperlinked the URLs) from that article:
This will happen if the administrator has not created a PostgreSQL user account for you. (PostgreSQL user accounts are distinct from operating system user accounts.) If you are the administrator, see Chapter 20 for help creating accounts. You will need to become the operating system user under which PostgreSQL was installed (usually postgres) to create the first user account. It could also be that you were assigned a PostgreSQL user name that is different from your operating system user name; in that case you need to use the -U switch or set the PGUSER environment variable to specify your PostgreSQL user name
For your purposes, you can do:
1) Create a PostgreSQL user account:
sudo -u postgres createuser tom -d -P
(the -P option to set a password; the -d option for allowing the creation of database for your username 'tom'. Note that 'tom' is your operating system username. That way, you can execute PostgreSQL commands without sudoing.)
2) Now you should be able to execute createdb and other PostgreSQL commands.
1- Login as default PostgreSQL user (postgres)
sudo -u postgres -i
2- As postgres user. Add a new database user using the createuser command
[postgres]$ createuser --interactive
3-exit
[postgres]$ exit
If you don't want to change the authentication method (ident) and mess with pg_hba.conf use this:
First login as the default user
sudo su - postgres
then access psql and create a user with the same name as the one you are login in
postgres=# CREATE USER userOS WITH PASSWORD 'garbage' CREATEDB;
you can verify your user with the corresponding roles with
postgres=# \du
Afer this you can create your database and verify it with
psql -d dbName
\l
\q
I had the same issue, i just do this
sudo su - postgres
createuser odoo -U postgres -dRSP #P for password
(odoo or user name that you want o give the postgres access)
On Windows use:
C:\PostgreSQL\pg10\bin>createuser -U postgres --pwprompt <USER>
Add --superuser or --createdb as appropriate.
See https://www.postgresql.org/docs/current/static/app-createuser.html for further options.
For Linux, you can activate SUPERUSER to enable to create databases like this:
Go to terminal/shell
Enter inside postgres using
sudo -u postgres -i
Now your terminal will be like "postgres#anish-Latitude-E7450:~$"
Enter postgres terminal using
psql
Now your terminal will be like "postgres=#"
Enter alter user [postgres_user_name] createdb;
Now the user will be having access to create db.
Exit psql using '\q'
Logout postgres using exit
Hope this helps you.
You need to first run initdb. It will create the database cluster and the initial setup
See How to configure postgresql for the first time? and http://www.postgresql.org/docs/8.4/static/app-initdb.html

PostgreSQL error Fatal: role “username” does not exist

I'm setting up my PostgreSQL 9.1 in windows.
I can't do anything with PostgreSQL: can't createdb, can't createuser; all operations return the error message
Fatal: role root does not exist
root is my account name, which I created while installing Postgresql
But I am able to connect using:
username : postgres
How can I connect to postgres using role root?
There is a solution mentioned for linux platforms using su command here but not able to figure out solution for windows7
Thanks in Advance
If you want to login to Postgres using the username root you need to first create such a user.
You first need to login as the Postgres super user. This is typically postgres (and is specified during installation):
psql -U postgres <user-name>
Then you can create roles and databases:
psql (9.4.0)
Type "help" for help.
postgres=# create user root with password 'verysecret';
CREATE ROLE
postgres=# \q
c:\
c:\>psql -U root postgres
psql (9.4.0)
Type "help" for help.
postgres=>
Logged in as the superuser you can also grant the root user the necessary privileges.
All parameters for psql are documented in the manual.
Creating users and databases is also documented in the manual:
connecting to the database
create user
create database
In some cases, when you install postgres the initial DB is not created.
You need to execute initdb.
Same issue appeared while restoring DB/table on postgres docker container .
. When you connect to Postgres DB(psql shell) from inside the docker container, the default user would be a "root" (unless you specify psql -U "some-user-name")
[Manjunath-MacBook-Air:$ sudo docker exec -it a2ff6075344e bash
bash-5.0# psql -U postgres postgres < testdb_pg_dump
So, the issue gets resolved, by logging to psql shell with appropriate username
Here , -U postgres specifies that user connecting to DB is "postgres"

pgAdmin:Password authentication failed [duplicate]

I have installed PostgreSQL 8.4, Postgres client and Pgadmin 3. Authentication failed for user "postgres" for both console client and Pgadmin. I have typed user as "postgres" and password "postgres", because it worked before. But now authentication is failed. I did it before a couple of times without this problem. What should I do? And what happens?
psql -U postgres -h localhost -W
Password for user postgres:
psql: FATAL: password authentication failed for user "postgres"
FATAL: password authentication failed for user "postgres"
If I remember correctly the user postgres has no DB password set on Ubuntu by default. That means, that you can login to that account only by using the postgres OS user account.
Assuming, that you have root access on the box you can do:
sudo -u postgres psql
If that fails with a database "postgres" does not exists error, then you are most likely not on a Ubuntu or Debian server :-) In this case simply add template1 to the command:
sudo -u postgres psql template1
If any of those commands fail with an error psql: FATAL: password authentication failed for user "postgres" then check the file /etc/postgresql/8.4/main/pg_hba.conf: There must be a line like this as the first non-comment line:
local all postgres ident
For newer versions of PostgreSQL ident actually might be peer. That's OK also.
Inside the psql shell you can give the DB user postgres a password:
ALTER USER postgres PASSWORD 'newPassword';
You can leave the psql shell by typing CtrlD or with the command \q.
Now you should be able to give pgAdmin a valid password for the DB superuser and it will be happy too. :-)
The response of staff is correct, but if you want to further automate can do:
$ sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
Done! You saved User = postgres and password = postgres.
If you do not have a password for the User postgres ubuntu do:
$ sudo passwd postgres
This was frustrating, most of the above answers are correct but they fail to mention you have to restart the database service before the changes in the pg_hba.conf file will take affect.
so if you make the changes as mentioned above:
local all postgres ident
then restart as root ( on centos its something like service service postgresql-9.2 restart )
now you should be able to access the db as the user postgres
$psql
psql (9.2.4)
Type "help" for help.
postgres=#
Hope this adds info for new postgres users
Edit the pg_hba.conf file, for Debian on /etc/postgresql/9.3/main/pg_hba.conf and for Red Hat/IBM derivates at /var/lib/pgsql/9.4/data/pg_hba.conf
Change all authentication methods to trust.
Change Linux Password for postgres user.
Restart Server.
Login with psql -h localhost -U postgres and use the just set Unix password.
If it works you should re-set the pg_hba.conf file to values with md5 or ident methods and restart.
For those who are using it first time and have no information regarding what the password is they can follow the below steps(assuming you are on ubuntu):
Open the file pg_hba.conf in /etc/postgresql/9.x/main
sudo vi pg_hba.conf
2.edit the below line
local all postgres peer
to
local all postgres trust
Restart the server
sudo service postgresql restart
Finally you can login without need of a password as shown in the figure
Ref here for more info
When you install postgresql no password is set for user postgres, you have to explicitly set it on Unix by using the command:
sudo passwd postgres
It will ask your sudo password and then promt you for new postgres user password.
Source
Try to not use the -W parameter and leave the password in blank. Sometimes the user is created with no-password.
If that doesn't work reset the password. There are several ways to do it, but this works on many systems:
$ su root
$ su postgres
$ psql -h localhost
> ALTER USER postgres with password 'YourNewPassword';
As a rule of thumb: YOU SHOULD NEVER EVER SET A PASSWORD FOR THE POSTGRES USER.
If you need a superuser access from pgAdmin, make another superuser. That way, if the credentials for that superuser is compromised, you can always ssh into the actual database host and manually delete the superuser using
sudo -u postgres -c "DROP ROLE superuser;"
Once you are in your postgres shell, Enter this command
postgres=# \password postgres
After entering this command you will be prompted to set your password , just set the password and then try.
If you are trying to login postgres shell as postgres user, then you can use following commands.
switch to postgres user
# su - postgres
login to psql
# psql
Hope that helps
Ancient thread, but I wasted half a day dealing with this in 2020, so this might help someone: Double-check your postgres port (on Ubuntu, it's in /etc/postgresql/9.5/main/postgresql.conf). The psql client defaults to using port 5432, BUT in my case, the server was running on port 5433. The solution was to specify the -p option in psql (e.g. psql --host=localhost --username=user -p 5433 mydatabase).
If you leave off the --host parameter, psql will connect via a socket, which worked in my case, but my Golang app (which uses TCP/IP) did not. Unfortunately, the error message was password authentication failed for user "user", which was misleading. The fix was to use a url connection string with the port (e.g. postgres://user:password#localhost:5433/mydatabase).
My setup was Ubuntu 18.04 on Digital Ocean, with postgres 9.5 installed via apt-get, so not sure why this happened. Hope this saves you some time.
I faced the same error on Windows 10. In my case, when I setup the Postgres, my username was postgres by default.
But when I ran the command psql, it as showing my the username as jitender which is my machine name, and I don't know why this username had been setup.
Anyway to solved it, I did the following steps:
Run the command psql --help
In the output, look for the Connection Option, here you will see your default user, in my case it as jitender.
You will also get the command to set the anoter username, which should be psql --username postgres. You set the username whatever you require, and that's all, problem got solved.
If you see error
FATAL: password authentication failed for user "postgres"
and you are sure that your password is correct, check that the password has any special characters, especially "%" or slashes.
In my case, it was "%" in the password string. After removing this symbol, everything works fine.
Here are some combinations which I tried to login:
# login via user foo
psql -Ufoo -h localhost
sudo -u postgres psql postgres
# user foo login to postgres db
psql -Ufoo -h localhost -d postgres
Time flies!
On version 12, I have to use "password" instead of "ident" here:
local all postgres password
Connect without using the -h option.
First of All password crate
ALTER USER postgres with encrypted password 'postgres';
then service restart:
sudo systemctl restart postgresql.service
End.
Follow these steps :
sudo -u postgres -i
psql
\password postgres
After that, enter your password twice.
Then use that password in the pgAdmin4.
I was also faced this issue while login the postgres. I was followed the below steps and able to login with postgres and pgadmin.
Step1: Open Postgres using terminal.
sudo su postgres
Step2: Open psql.
psql
Step3: Reset the password of user
ALTER USER user_name WITH PASSWORD 'new_password';
Step4: Give the permission on database to user.
GRANT ALL PRIVILEGES ON DATABASE my_database TO db_user;
I just wanted to add that you should also check if your password is expired.
See Postgres password authentication fails for details.
In my case, Ubuntu 20.04 Postgresql 12 was using the wrong port.
I've checked /etc/postgresql/12/main/postgresql.conf and realized it was 5433 instead of 5432.
The answer is #diego
I want to add some explanations of how I fixed error and I hope it will help other folks:
ERROR: password authentication failed for user "postgres"
On Window
Make sure you download Postgres software, install it, create and confirm password
and make sure its not complicated with some symbols and characters.
Open window, click SQL Shell (PSQL) and access it and create database
Create connection string like
postgres://postgres:your_password#localhost:port/your_database
On WSL
Follow Microsoft documentation
After successful installation
// Open postgres
su postgres
// Type psql and hit enter
psql
// Create a user postgres if not exist or any other user you want
CREATE USER your_user_db WITH PASSWORD 'match_password_with_db_password';
// Give user password same as the one you set up for postgres db
ALTER USER your_user_db WITH PASSWORD 'match_password_with_db_password';
// Restart the server
sudo service postgresql restart
i had a similar problem.
Ubuntu was left me log in in console with any password for superuser.
Except when i connected with -h localhost in psql line command.
I Observed too that "localhost:8080/MyJSPSiteLogIn" - showed: Fatal: autentication error with user "user".
pg_hba.conf was ok.
I noted had two versions of postgres running in the same service.
Solved - uninstalling inutil version.
I had faced similar issue.
While accessing any database I was getting below prompt after updating password
"password authentication failed for user “postgres”" in PGAdmin
Solution:
Shut down postgres server
Re-run pgadmin
pgadmin will ask for password.
Please enter current password of mentioned user
Hope it will resolve your issue
This happens due to caching.
When you run, php artisan config:cache, it will cache the configuration files. Whenever things get change, you need to keep running it to update the cache files. But, it won't cache if you never run that command.
This is OK for production, since config don't change that often. But during staging or dev, you can just disable caching by clearing the cache and don't run the cache command
So, just run php artisan config:clear, and don't run the command previously to avoid caching.
Check original post
Password authentication failed error on running laravel migration
In my case, its Password was longer than 100 characters. Setting it to a smaller character password worked.
Actually I am wondering is there a reference somewhere to that.
Please remember if you have two versions of Postgres installed you need to Uninstall one of them, in my case on MacOS I had one version installed via .dmg and one via brew.
What worked for me was to uninstall the one installed via .dmg using the following steps
Go to /Library/PostgreSQL/13.
Open uninstall-postgres.app.
then try
psql postgres
it should work.
Answer given is almost correct just missing some pointers which i'll be taking care of in my solution
First make sure your user have a sudo access if not you can use the below command to add your user as sudo user :-
sudo adduser <username> sudo
The change will take effect the next time the user logs in.
i) Now go to sudo vim /etc/postgresql/<your_postgres_version>/main/pg_hba.conf file and look for line that says :
local all postgres md5 #peer
and comment that. Just below that line there must be a commented line that says:
local all postgres peer
or for older versions it'll be :-
local all postgres ident
Uncomment that line.
ii) Now restart the postgres by using any of these commands :-
sudo /etc/init.d/postgresql restart
OR
sudo service postgresql restart
iii) Now you can simply log into postgres using the following command :
sudo -u postgres psql
iv) once you're in you can create any operation you want to in my case i wanted to create a new database you can do the same using below command :
CREATE DATABASE airflow_replica;
In my case it was so simple! I was taken error in application JAVA Spring because I needed remember the Database Superuser, it is showed during the install process PostgreSQL, in my case the datasource would be postgres. So, I added correctly the name and it works!
Open pg_hba.conf in any text editor (you can find this file in your postgres instalation folder);
Change all the methods fields to trust (meaning you don't need a password for postgre);
Run in your console this comand:
"alter user postgres with password '[my password]';" | psql -U postgres
(meaning to alter some user password for [my password] for the user as parameter -U postgres)
Et voilà (don't forget to change back the method from trust for the one that should be best for you)
I hope this help someone someday.
I hope this will help you short of time.
You can change the password of postgres sql by using bellow command.
Command
sudo -u postgres psql
And next you can update the password
Command
Alter user postgres password 'YOUR_NEW_PASSWORD';

Can't I get to Postgres with plain psql

I always have to give the command like sudo -u postgres psql in order to login into Postgres console. What do I have to in order to login into postgres like sudo psql or psql
The environment I am working on is Ubuntu Linux 12.04
Thanks in advance.
It's normal that after the installation, only the postgres user is able to do anything with the database server. The installer can't assume that we'd want to open access to anyone else.
To give yourself access as a casual user, assuming as an example that your login name is joe (your normal, non-priviledged user), you just need to create a corresponding user and database:
Inside psql as the postgres administrator (with sudo -u postgres psql), issue:
CREATE USER joe;
CREATE DATABASE joe OWNER joe;
After that, when issuing psql at the shell prompt, it will connect by default to your own database with your username. You no longer have to sudo to postgres until you need to issue other administrator commands.
Your psql is in /usr/bin/psql. You shouldn't need to use sudo unless your permissions are wrong, or unless your link is wrong. (In later versions of PostgreSQL, /usr/bin/psql is a symbolic link to the executable. I don't know whether that's true in 8.4. On my home computer, it links to /usr/share/postgresql-common/pg_wrapper.)
The full skeleton syntax for psql is
psql -U username -h hostname -p portnumber database_name
So, for example, when I connect to my scratch database (named "sandbox"), I do it like this.
$ psql -U postgres -h localhost -p 5432 sandbox
You would substitute
your database username (which must already exist, and which isn't necessarily the same as your network/computer username),
your hostname (but "localhost" is probably right for a local install of PostgreSQL),
the port PostgreSQL is listening on (but 5432 is probably right; it's the default), and
your database name.
Would
psql -U psql
work for you?
EDIT:
I though you would mind about sudo.
If your problem is rather typing -U <user>, you could also set the environment variable PGUSER. This could also be done in your shell's logon script, so that it will always be set.
The other enviroment variables of interest might be PGDATABASE, PGHOST, PGPORT.

Local postgresql server and creating new user on linux

I installed postgresql via synaptic on ubuntu.
Now I dont know how to create new user, run server and create it in pgAdmin3.
Use this to create a postgres user called $USER:
sudo -u postgres createuser --superuser $USER
Creating a DB with the same name as your user name makes things easier. It becomes your default DB.
createdb $USER
Use this to set a password for USER. This must be done for pgadmin3 to work.
sudo -u postgres psql
postgres=# \password USER