With admin option and with GRANT option

Source: Internet
Author: User

When you give user permissions or role, you often use the WITH admin option and with GRANT option,
In use, it may be easy to confuse the situation, now the similarities and differences between their points are summarized as follows:
Same point:
-Two can both give the user
Permissions, you can also use it when assigning a role
GRANT CREATE SESSION to EMI with ADMIN OPTION;
GRANT
CREATE SESSION to role with ADMIN OPTION;
GRANT Role1 to Role2 with ADMIN
OPTION;
Grant SELECT on Customers1-Bob with GRANT OPTION;
GRANT Select
On Customers1 to Hr_manager (role) with GRANT OPTION;
-
Both assigns can assign permissions or role to other users
-Two option is available for DBA and app ADMIN
Management brings convenience, but at the same time, it brings unsafe factors.

different points:
-with admin option can only be assigned to system privilegeWhen you use the
-with GRANT option can only be assigned to object privilegeWhen you use the
-When you revoke a system privileges with admin option, the associated permissions are preserved
For example:
1. The DBA gives the Create TABLE system permission to Jeff with
ADMIN OPTION
2. JEFF creates TABLE
3. JEFF grants the CREATE TABLE
System permissions to EMI
4. EMI creates A table
5. DBA undoes the Create TABLE
System permissions from Jeff
Results:
JEFF's table still exists, but cannot create a new table.
EMI's table still exists and he retains the Create TABLE system permissions.
-When you revoke an object privileges with GRANT option, the associated permissions are also undone
For example:
1. JEFF gave the Select object privileges on the EMP with ADMIN
OPTION
2. JEFF gave the SELECT permission on the EMP to EMI
3. Later, revoke Jeff's SELECT permission
Results:
EMI permissions have been revoked.

Conclusion: When revoking User A's system privileges, the rights granted to B users by a user will be retained; When authorizing user A's object permissions, the object permissions granted to B users by a user are revoked at the same time.

With admin option and with GRANT option

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.