Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register


0
(click on this box to dismiss)

User and group with same name

CUBRID seems to operate with users and groups. How do you differentiate between an user and group with the same name? How does GRANT work in such case ?

link comment (0)
asked 3 years ago
cubriduser
35
78 Answers
0

GRANT operation [ { ,operation }_ ] ON table_name [ { ,table_name }_ ]

TO user [ { ,user }_ ] [ WITH GRANT OPTION ] [ ; ]

Quoting from the manual, "user : Specifies the name of the user (group) to be granted. Enter the login name of the database user or PUBLIC, a system-defined user. If PUBLIC is specified, all database users are granted with the permission.".


This means that if a user with the same name as a group is given, then all users belonging to that group will receive the privileges and not just the user specified.

link comment (1)
answered 3 years ago
nicola_magdalena
248
0

This is not an answer, but a comment to the above answer!

It looks that the QA module does not have support for comments splitted on multiple lines...

So I'm posting my comment as an answer...

 

I don't think the answer is correct. It looks that actually cubrid does not allow an user and a group with the same name:

cubrid> create user usr1;
Command executed. (0.02 sec)

cubrid> create user usr1 groups usr1;
Error -142: Adding member causes the user hierarchy to become a cyclic graph.

Moreover, trying to directly create a group, create an user and assign to the group and then trying to create an user with the group name givs this error:

 

Error -164: User "usr1" already exists.

 

So it looks that definitely you can't have an user with the same name as a group... Is this correct?

 

link comment (1)
answered 3 years ago
impega
128




You are either using a very old browser or a browser that is not supported.
In order to browse cubrid.org you need to have one of the following browsers:



Internet Explorer: Mozilla Firefox: Google Chrome: