1. Tried to install peervpn.
  2. Copied commands from website to install peervpn.
  3. There was one command which said to copy peervpn to /usr/local.
  4. It said 'not enough permissions'.
  5. Tried to rectify it blindlessly by copying pasting commands.
  6. One command was to chown /usr/local and chmod it 777
  7. By mistake I did it on /usr/
  8. I knew the damage has been done
  9. I first error that I faced with was that of sudo (Fixed by using pkexec through console)
  10. After that fixed permissions of crontab, passwd
  11. Then was the apocalypse of postgresql.
  12. I uninstalled it but by chance backed up the data (/usr/lib/postgresql/9.4/main/)
  13. Purged and installed postgres again and copied the data back
  14. Things are somewhat in control now
  15. Still the issue of mail remains [Solved]