If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > What is purpose of default DB user group "PUBLIC"? Can I delete this group?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-24-05, 06:08
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
What is purpose of default DB user group "PUBLIC"? Can I delete this group?

Hi,

I found out that when "create database" command is carried out the "PUBLIC" group is automaticaly created.
(To see this: on database SAMPLE | User and Group Objects | DB Groups | PUBLIC). What is purpose of this group? Can I delete this group?

BTW, there is no group PUBLIC defined on Windows user groups.

My system:
- Windows 2003 Server Standard Edition
- DB2 Workgroup Server Edition version 8 fixpack 9

Thanks,
Grofaty

Last edited by grofaty; 11-24-05 at 06:24.
Reply With Quote
  #2 (permalink)  
Old 11-24-05, 07:05
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
It's not a group but rather a keyword that you use when you grant or revoke privileges to (from) all authenticated users. You can't deleted it.
Reply With Quote
  #3 (permalink)  
Old 11-25-05, 02:06
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
n_i,
In Control Center on SAMPLE database I have revoke all privileges from DB Groups: PUBLIC and it disappeared (deleted) from User and Group Objects | DB Groups.

Will I experience any limitation in DB2 functionalities?

Thanks,
Grofaty
Reply With Quote
  #4 (permalink)  
Old 11-25-05, 03:07
grofaty grofaty is offline
Registered User
 
Join Date: Jan 2003
Posts: 1,570
Ok,
I can't connect to sample database now. So I droped it and recreate it.
So group PUBLIC has to exist on system.
Thanks,
Grofaty
Reply With Quote
  #5 (permalink)  
Old 11-25-05, 08:05
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Quote:
Originally Posted by grofaty
Ok,
I can't connect to sample database now. So I droped it and recreate it.
So group PUBLIC has to exist on system.
Thanks,
Grofaty
PUBLIC does not need to exist, it only applies to users who aren't part of any other group.

If you try connect to your sample database as the instance owner, it will succeed. Or from any other user in a group you've defined on DB2.
__________________
--
Jonathan Petruk
DB2 Database Consultant
Reply With Quote
  #6 (permalink)  
Old 11-25-05, 08:57
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Strictly speaking, PUBLIC doesn't "exist" - it's just a convenient way to say "allow everybody to do stuff". You can revoke all grants from PUBLIC, which would mean that only those users with _explicit_ grants or authorities will be able to connect/select/etc.
Reply With Quote
  #7 (permalink)  
Old 11-25-05, 09:32
Cougar8000 Cougar8000 is offline
Registered User
 
Join Date: Nov 2005
Location: IL
Posts: 554
+1

In our shop it is against all known policies to have a PUBLIC having access to anything. It is the first thing that is getting revoked once a new db is created.

So, as said before you should be ok assuming you already have id on that system and grants are given to it. If not, log in with an instance id and give apropriate grants.
__________________
--
IBM Certified DBA on DB2 for Linux, UNIX, and Windows

DB2 v9.1.0.2 os 5.3.0.0
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On