Guest User

Untitled

a guest
Jun 29th, 2018
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. [root@linuxbox ~]# sudo -u postgres createuser confluenceuser -d -P
  2. [root@linuxbox ~]# sudo -u postgres createdb --encoding=utf8 --owner=confluenceuser confluence
  3.  
  4. [root@linuxbox ~]# su - postgres
  5. Last login: Fri Jun 29 12:29:42 CEST 2018 on pts/0
  6. -bash-4.2$ psql -U postgres
  7. psql (10.4)
  8. Type "help" for help.
  9.  
  10. postgres=# password confluenceuser
  11. Enter new password:
  12. Enter it again:
  13. postgres=# grant all privileges on database confluence to confluenceuser with grant option;
  14. GRANT
  15. postgres=# alter role confluenceuser with createdb login;
  16. ALTER ROLE
  17. postgres=# alter user confluenceuser valid until 'infinity';
  18. ALTER ROLE
  19. postgres=# list
  20. List of databases
  21. Name | Owner | Encoding | Collate | Ctype | Access privileges
  22. ------------+----------------+----------+-------------+-------------+--------------------------------------
  23. confluence | confluenceuser | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =Tc/confluenceuser +
  24. | | | | | confluenceuser=C*T*c*/confluenceuser
  25. postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
  26. template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
  27. | | | | | postgres=CTc/postgres
  28. template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres +
  29. | | | | | postgres=CTc/postgres
  30. (4 rows)
  31.  
  32. -bash-4.2$ psql -U confluenceuser
  33. psql: FATAL: Peer authentication failed for user "confluenceuser"
Add Comment
Please, Sign In to add comment