Remember to replace newuser and password with your desired username and password. I'm not sure what I'm missing under Ubuntu. 1 CREATE ROLE newuser WITH LOGIN PASSWORD password This command will create a new role named newuser with the ability to log in and a password of password. I did all the above on Win XP with the latest PostgreSQL installer and everything work flawlessly with Django. I can't really tell from the above if my goal has been achieved, but is there a way to test if the user jdoe can communicate with the database mydb? I'm testing it though Django's settings: DATABASE_ENGINE = 'postgresql_psycopg2'īut I'm getting the following error after a python manage.py syncdb: psycopg2.OperationalError: FATAL: Ident authentication failed for user "jdoe" Showing my list of users( \du), I get: List of roles Once a password is expired, you need to get the superuser to reset it, or maybe login with some. User, Database users login/username Password, Database users password SSL Mode, Determines whether or with what. Postgres | postgres | UTF8 | en_CA.UTF-8 | en_CA.UTF-8 | To do that, PostgreSQL would have to implement some restricted login capability which lets a person log in with an expired password, but then not let them do anything other than change the password. Database, Name of your PostgreSQL database. Mydb | jdoe | UTF8 | en_CA.UTF-8 | en_CA.UTF-8 | =CTc/mydb Name | Owner | Encoding | Collation | Ctype | Access privileges I did a few things through the GUI pgAdmin III and after running \l in the psql shell, I get the following output: List of databases Step 3: Creating a Superuser A superuser is a special type of user that has all permissions. My goal is to give user jdoe full access to database mydb. 1 CREATE ROLE newuser WITH LOGIN PASSWORD 'password' This command will create a new role named newuser with the ability to log in and a password of password. I also have created a new database called mydb. I created a new user(jdoe) under my local PostgreSQL with the following command in the psql shell: CREATE USER jdoe WITH PASSWORD 'password'
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |