[nmglug] localhost
Jason Schaefer
js at jasonschaefer.com
Mon Sep 14 19:26:34 PDT 2009
Brian
postgres has a lot of emphasis on out-of-box security. Its a little
cumbersome at first but very nice. Pg has an auth config file you will
want to be familiar with. Its called pg_hba.conf and on my system its
here /etc/postgresql/8.3/main/pg_hba.conf.
Default auth on my system was set to sameuser for local. So this will
only allow you to connect to the postgres db as the postgres user. If
you switch to root and then su to postgres you can then login to
postgres on the command line and set a password.
postgres$ psql
alter user postgres with password 'changeme';
You should also be able to do something like gksudo su postgres &
pgadmin3 if you want a graphical interface for postgres. You can set a
new user, pass and db. You can also set a password for the postgres
user. Now the pg_hba.conf file needs to be set to allow password
logins from localhost.
local all all md5
restart postgres and now you can login, locally, with a password to
access postgres.
Hope this helps and didn't confuse you further:-)
Jason
More information about the nmglug
mailing list