Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 10th January 2013
ershiba ershiba is offline
Loading, please wait...
Join Date: Dec 2012
Posts: 34
Default postgresql - log into psql without password problem

hi bsd members,

i got the following issue that somehow i think kinda weird,

i pkg_add postgresql-server
$ sudo su - _postgresql
$ /usr/local/bin/initdb -D /var/postgresql/data
// start the postgresql server
$ /usr/local/bin/postgres -D /var/postgresql/data

$ whoami
$ _postgresql
$ psql postgres
postgres=# create role pgoem login password 'pgoempasswod' createdb valid until 'infinity';

// restart openbsd
// i use pgAdmin III to connect postgresql
it asks for password when i use pgoem user to connect ( ok, this should be how things done )

// using putty, i log into OpenBSD using my OpenBSD username 'oem'
// then i tried the following
$ psql -U pgoem postgres
psql (9.1.4)
Type "help" for help.
postgres=> CREATE DATABASE testing;
i use pgAdmin III to check, a database "testing" was created with owner set to pgoem,

but how could pgoem without using password, able to access postgres database and able to allow create a database? isn't it weird?
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
postgresql VS mysql .. when which is better ? daemonfowl General software and network 3 12th September 2012 05:30 AM
Why do we need password to shutdown the box ? sw2wolf FreeBSD General 3 22nd May 2012 04:35 PM
Set password for Folder mfaridi FreeBSD Security 6 5th September 2008 10:49 PM
PostgreSql rc.d script fridder FreeBSD Ports and Packages 1 1st July 2008 01:12 AM
postgresql chinese character problem gosha OpenBSD Packages and Ports 2 8th June 2008 09:37 PM

All times are GMT. The time now is 11:02 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick