Re: Simple commands don't work - Mailing list pgsql-novice

From Larry Martell
Subject Re: Simple commands don't work
Date
Msg-id CACwCsY77A6MorkVmyY7v9_UUcSq+FyHW90pRQW7nn1zEGrHNbA@mail.gmail.com
Whole thread Raw
In response to Re: Simple commands don't work  (Jason Whitener <jwhitene@pcc.edu>)
Responses Re: Simple commands don't work  (Albe Laurenz <laurenz.albe@wien.gv.at>)
List pgsql-novice
On Mon, Jun 16, 2014 at 1:59 PM, Jason Whitener <jwhitene@pcc.edu> wrote:
> Check in your pg_hba.conf file.
> http://www.postgresql.org/docs/9.1/interactive/auth-pg-hba-conf.html
>
> If you are working on the server itself, pg_hba.conf may be letting you in
> without passwords.  You'll see a line like 'host all all 127.0.0.1 trust'.

Nope - all the host entries have password.

>
>
> On Mon, Jun 16, 2014 at 10:45 AM, Larry Martell <larry.martell@gmail.com>
> wrote:
>>
>> Hello-
>>
>> I am new to Postgres, but I am very experienced with Sybase, Oracle,
>> and MySQL. I am trying to use some simple commands, but they do not
>> seem to work.
>>
>> First I wanted to give myself a password. I read in the online docs
>> the command was this:
>>
>> phis=> alter user larry set password = 'XXXX';
>> ERROR:  unrecognized configuration parameter "password"
>>
>> Then I read somewhere else it is:
>>
>> phis=> ALTER USER larry WITH PASSWORD 'XXXX';
>> ALTER ROLE
>>
>> But then it still let me log in without one.
>>
>> Then I checked with pgAdmin and it showed I did not have any password.
>> I set one there, but it still lets me login without one.
>>
>> Then I went to do a select from a table, and I got permission denied.
>> But the table is in a schema (the name is "public") that is set for
>> "GRANT ALL TO ALL"
>>
>> According to the docs this would be the command to grant access to all
>> tables:
>>
>> phis=> grant select on all tables in public to larry;
>> ERROR:  syntax error at or near "public"
>>
>> But it doesn't like that. The I found this:
>>
>> phis=> grant ALL PRIVILEGES ON DATABASE phis to larry;
>> WARNING:  no privileges were granted for "phis"
>>
>> From pgAdmin I was able to grant myself select access, but why don't
>> the command line commands work?
>>
>>
>> Thanks!
>> -larry


pgsql-novice by date:

Previous
From: Jason Whitener
Date:
Subject: Re: Simple commands don't work
Next
From: Kevin Grittner
Date:
Subject: Re: Simple commands don't work