Administering PostgreSQL

So I found this article which said:

 $ sudo -u postgres psql
 postgres=> alter user postgres password 'apassword';
 postgres=> create user your-user createdb createuser password 'passwd';
 postgres=> create database your-db-name owner your-user;
 postgres=> \q

Note: to enable password logins for the ‘postgres’ admin account, edit: /etc/postgresql/9.4/main/pg_hba.conf and after this line:

local   all             postgres                                peer

Add this line:

local   all             postgres                                md5

Password Best Practice

I read Password Primer today:

  1. Use at least 8-10 characters.
  2. Interchange upper and lower case letters with numbers and symbols.
  3. Consider a “Passphrase” like “Every good band deserves fans”: “!eGbAdfns2”
  4. Change your password every 6 to 8 months and immediately if you believe it’s been compromised.
  5. NEVER share your password with anyone you don’t trust – some would say never share your password PERIOD.
  6. Don’t write your password(s) on sticky notes and then post them to your monitor!
  7. Avoid using the same passwords for all of your accounts.
  8. Never send your password to someone in an e-mail.
  9. Don’t use the “Remember Password” option in browsers or websites
  10. NEVER make your login and your password the same thing.