A user atribute question

Started by stanover 6 years ago3 messagesgeneral
Jump to latest
#1stan
stanb@panix.com

Just starting to expore setting up roles & useres. I ran this statement:

GRANT CONNECT ON DATABASE stan TO employee;

But yet \du still reports:

employee | Cannot login

What am I doing wrong?

--
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
-- Benjamin Franklin

#2Rob Sargent
robjsargent@gmail.com
In reply to: stan (#1)
Re: A user atribute question

On Aug 17, 2019, at 9:45 AM, stan <stanb@panix.com> wrote:

Just starting to expore setting up roles & useres. I ran this statement:

GRANT CONNECT ON DATABASE stan TO employee;

But yet \du still reports:

employee | Cannot login

What am I doing wrong?

--
"They that would give up essential liberty for temporary safety deserve
neither liberty nor safety."
-- Benjamin Franklin

Does the role have the login option set?

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: stan (#1)
Re: A user atribute question

stan <stanb@panix.com> writes:

Just starting to expore setting up roles & useres. I ran this statement:
GRANT CONNECT ON DATABASE stan TO employee;

But yet \du still reports:
employee | Cannot login
What am I doing wrong?

That's not a permissions issue, it's a role-property issue; the
role is marked as not being allowed to be used as a login role.
Probably because you said CREATE ROLE not CREATE USER.

You can fix it with ALTER ROLE ... LOGIN or something along
that line, check the ALTER ROLE page.

regards, tom lane