Re: Why can't I change a password

From: Dmitriy Igrishin <dmitigr(at)gmail(dot)com>
To: Steve Litt <slitt(at)troubleshooters(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Why can't I change a password
Date: 2011-01-16 11:21:28
Message-ID: AANLkTi=zuTZtErnoWiULwiAdUFi81A5+_nas4D-46DRj@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hey Steve,

2011/1/16 Steve Litt <slitt(at)troubleshooters(dot)com>

> Hi all,
>
> I've somehow messed up something.
>
> psql super
>
psql's synopsis is
psql [option...] [dbname [username]]
Thus, the call "psql super" connects psql to a database
"super" but since username unspecified it is connected
with current Unix user (which is returned by whois(1)).

So, you should call psql like that
psql super super
or like that
psql -U super
In last case psql will be connected to the database "super".

psql (8.4.5)
> Type "help" for help.
>
> super=> \du+
> List of roles
> Role name | Attributes | Member of | Description
> -----------+-------------+-----------+-------------
> bobo | | {} |
> junk | | {} |
> myuid | | {} |
> postgres | Superuser | {} |
> : Create role
> : Create DB
> slitt | Create DB | {} |
> super | Superuser | {} |
> : Create role
> : Create DB
>
> super=>
> super=> alter user myuid password 'mypass';
> ERROR: permission denied
> super=>
>
> I don't get it. User super is listed as attributes Superuser, create role
> and
> createdb, so why the lack of permission? This also happened when I was in
> as
> "postgres".
>
> Interestingly, earlier tonight I was changing passwords just fine. I don't
> know what happened. Obviously there's a chunk of information I'm missing.
>
> What diagnostic tests can I do to narrow this down?
>
> Thanks
>
> SteveT
>
> Steve Litt
> Recession Relief Package
> http://www.recession-relief.US
> Twitter: http://www.twitter.com/stevelitt
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>

--
// Dmitriy.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andreas Kretschmer 2011-01-16 13:59:44 Re: Need help writing exclusion constraint
Previous Message Alban Hertroys 2011-01-16 09:43:20 Re: Trigger Performance