Thread: i have a problem of privilages

i have a problem of privilages

From
"Penchalaiah P."
Date:
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Hi good afternoon to every one..</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Now I am accessing remote database server in postgresql.. but I can see all tables and functions in
remotedatabase server but I can delete,update,alter and drop tables in remote database server from my local machine..
toavoid these things wt I have to do…</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial">Just they have to see my tables and structure.. and they cant do any more operations on the tables..
toavoid this wt can I do please tell me solution …</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"> </span></font><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font
color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold">Thanks  &  Regards</span></font><font color="navy"><span
style="color:navy"></span></font></b><pclass="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font
color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold">Penchal reddy </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> Software Engineer           </span></font><font color="navy"><span
style="color:navy"></span></font></b><pclass="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font
color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold">Infinite Computer Solutions </span></font></b><b><font color="red" face="Tahoma"
size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; 
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> Exciting Times…Infinite Possibilities... </span></font><font color="navy"><span
style="color:navy"></span></font></b><pclass="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font
color="navy"face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold">SEI-CMMI level 5 </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">| </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">ISO 9001:2000</span></font><font color="navy"><span style="color:navy"></span></font></b><p
class="MsoNormal"style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:navy;font-weight:bold">IT SERVICES </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold">
BPO                                                                                                                                                                          
</span></font><fontcolor="navy"><span style="color:navy"></span></font></b><p class="MsoNormal"
style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><fontcolor="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:navy;font-weight:bold">Telecom </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;font-weight:bold">Finance</span></font></b><b><font color="red"
face="Tahoma"size="1"><span style="font-size: 
8.0pt;font-family:Tahoma;color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma"
size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">Healthcare </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:red;
font-weight:bold">| </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;font-weight:bold">Manufacturing</span></font></b><b><font
color="red"face="Tahoma" size="1"><span style="font-size: 
8.0pt;font-family:Tahoma;color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma"
size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">Energy & Utilities </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;font-weight:bold">Retail& Distribution
</span></font></b><b><fontcolor="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:red;font-weight:bold">|</span></font></b><b><fontcolor="navy"
face="Tahoma"size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:navy;font-weight:bold"> </span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">Government                                                        </span></font><font
color="navy"><spanstyle="color:navy"></span></font></b><p class="MsoNormal"
style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><fontcolor="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:navy;font-weight:bold">Tel +91-80-5193-0000(Ext:503)</span></font></b><b><font color="red" face="Tahoma"
size="1"><spanstyle="font-size:8.0pt;font-family:Tahoma; 
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> Fax  +91-80-51930009 </span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold"> Cell No  +91-9980012376</span></font></b><b><font color="red" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:red;font-weight:bold">|</span></font></b><b><font color="navy" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:navy;
font-weight:bold">www.infics.com</span></font></b><b><font color="black" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:black;
font-weight:bold">          </span></font><font color="navy"><span style="color:navy"></span></font></b><p
class="MsoNormal"style="mso-margin-top-alt:auto;margin-bottom:5.0pt"><b><font color="gray" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:gray;font-weight:bold">Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/
orits Customers and is intended for use only by the individual or entity to which it is addressed, and may contain
informationthat is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended
recipientor it appears that this mail has been forwarded to you without proper authority, you are notified that any use
ordissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately
at</span></font></b><b><fontcolor="black" face="Tahoma" size="1"><span style="font-size:8.0pt;font-family:Tahoma; 
color:black;font-weight:bold"> </span></font></b><b><u><font color="gray" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;color:gray;
font-weight:bold">info.in@infics.com </span></font></u></b><b><font color="gray" face="Tahoma" size="1"><span
style="font-size:8.0pt;font-family:Tahoma;
color:gray;font-weight:bold">and delete this mail from your records.</span></font><font color="navy"><span
style="color:navy"></span></font></b><pclass="MsoNormal"><font face="Times New Roman" size="3"><span style="font-size: 
12.0pt"> </span></font></div><table><tr><td bgcolor="#ffffff"><font color="#000000">Information transmitted by this
e-mailis proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the
individualor the entity to which it is addressed, and may contain information that is privileged, confidential or
exemptfrom disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been
forwardedto you without proper authority, you are notified that any use or dissemination of this information in any
manneris strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this email
fromyour records.<br /></font></td></tr></table> 

Re: i have a problem of privilages

From
"MJ Santhosh"
Date:

  create a user with limited permmission and give the same to the remote users.
May be that will solve your problem.



REVOKE INSERT,UPDATE,DELETE ON welcome from PUBLIC;

On 7/4/06, Penchalaiah P. <penchalaiahp@infics.com> wrote:

Hi good afternoon to every one..

 

Now I am accessing remote database server in postgresql.. but I can see all tables and functions in remote database server but I can delete,update,alter and drop tables in remote database server from my local machine.. to avoid these things wt I have to do…

Just they have to see my tables and structure.. and they cant do any more operations on the tables.. to avoid this wt can I do please tell me solution …

 

 

Thanks  &  Regards

Penchal reddy | Software Engineer           

Infinite Computer Solutions | Exciting Times…Infinite Possibilities...

SEI-CMMI level 5 | ISO 9001:2000

IT SERVICES | BPO                                                                                                                                                                          

Telecom | Finance | Healthcare | Manufacturing | Energy & Utilities | Retail & Distribution | Government                                                       

Tel +91-80-5193-0000(Ext:503) | Fax  +91-80-51930009 | Cell No  +91-9980012376 | www.infics.com          

Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this mail from your records.

 

Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this email from your records.



--

Re: i have a problem of privilages

From
"Penchalaiah P."
Date:

I have 290 tables .. to these tables one schema is there .. that name is public….so I don’t know how to create permission to these tables.. either I have to give permissions to individual table.. or I have to give permissions to schema or schema name… if I give permission to schema it has to applicable to all tables..

 

I created one user  with password… then finally I don’t know how to allocate permission to him.. please tell me very briefly step by step.. then I can understand…

Please tell me if any one knows about this……..

 


From: MJ Santhosh [mailto:mjsanthosh@gmail.com]
Sent: Tuesday, July 04, 2006 5:47 PM
To: Penchalaiah P.
Cc: pgsql-sql@postgresql.org; Richard Broersma Jr
Subject: Re: [SQL] i have a problem of privilages

 


  create a user with limited permmission and give the same to the remote users.
May be that will solve your problem.



REVOKE INSERT,UPDATE,DELETE ON welcome from PUBLIC;

On 7/4/06, Penchalaiah P. <penchalaiahp@infics.com> wrote:

Hi good afternoon to every one..

 

Now I am accessing remote database server in postgresql.. but I can see all tables and functions in remote database server but I can delete,update,alter and drop tables in remote database server from my local machine.. to avoid these things wt I have to do…

Just they have to see my tables and structure.. and they cant do any more operations on the tables.. to avoid this wt can I do please tell me solution …

 

 

Thanks  &  Regards

Penchal reddy | Software Engineer           

Infinite Computer Solutions | Exciting Times…Infinite Possibilities...

SEI-CMMI level 5 | ISO 9001:2000

IT SERVICES | BPO                                                                                                                                                                          

Telecom | Finance | Healthcare | Manufacturing | Energy & Utilities | Retail & Distribution | Government                                                       

Tel +91-80-5193-0000(Ext:503) | Fax  +91-80-51930009 | Cell No  +91-9980012376 | www.infics.com          

Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this mail from your records.

 

Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this email from your records.




--

Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this email from your records.

Re: i have a problem of privilages

From
"MJ Santhosh"
Date:
 I am not an expert in postgres, may this work for you.

REVOKE INSERT,UPDATE,DELETE ON ALL from PUBLIC;


it will take the INSERT,UPDATE,DELETE permmission from all users for all objects in the database.

If you want to give permission for a specific user on all objects

GRANT ALL on ALL to <user_name>;

Please make a backup before doing this , good for always
I am not sure is this is want you want.



On 7/4/06, Penchalaiah P. <penchalaiahp@infics.com > wrote:

I have 290 tables .. to these tables one schema is there .. that name is public….so I don't know how to create permission to these tables.. either I have to give permissions to individual table.. or I have to give permissions to schema or schema name… if I give permission to schema it has to applicable to all tables..

 

I created one user  with password… then finally I don't know how to allocate permission to him.. please tell me very briefly step by step.. then I can understand…

Please tell me if any one knows about this……..

 


From: MJ Santhosh [mailto:mjsanthosh@gmail.com]
Sent: Tuesday, July 04, 2006 5:47 PM
To: Penchalaiah P.
Cc: pgsql-sql@postgresql.org; Richard Broersma Jr
Subject: Re: [SQL] i have a problem of privilages

 


  create a user with limited permmission and give the same to the remote users.
May be that will solve your problem.



REVOKE INSERT,UPDATE,DELETE ON welcome from PUBLIC;

On 7/4/06, Penchalaiah P. < penchalaiahp@infics.com> wrote:

Hi good afternoon to every one..

 

Now I am accessing remote database server in postgresql.. but I can see all tables and functions in remote database server but I can delete,update,alter and drop tables in remote database server from my local machine.. to avoid these things wt I have to do…

Just they have to see my tables and structure.. and they cant do any more operations on the tables.. to avoid this wt can I do please tell me solution …

 

 

Thanks  &  Regards

Penchal reddy | Software Engineer           

Infinite Computer Solutions | Exciting Times…Infinite Possibilities...

SEI-CMMI level 5 | ISO 9001:2000

IT SERVICES | BPO                                                                                                                                                                          

Telecom | Finance | Healthcare | Manufacturing | Energy & Utilities | Retail & Distribution | Government                                                       

Tel +91-80-5193-0000(Ext:503) | Fax  +91-80-51930009 | Cell No  +91-9980012376 | www.infics.com          

Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and/ or its Customers and is intended for use only by the individual or entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this mail from your records.

 

Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this email from your records.




--

Information transmitted by this e-mail is proprietary to Infinite Computer Solutions and / or its Customers and is intended for use only by the individual or the entity to which it is addressed, and may contain information that is privileged, confidential or exempt from disclosure under applicable law. If you are not the intended recipient or it appears that this mail has been forwarded to you without proper authority, you are notified that any use or dissemination of this information in any manner is strictly prohibited. In such cases, please notify us immediately at info.in@infics.com and delete this email from your records.


_________________________________________________________
it is your attitude, and not the aptitude, that determines your altitude.
_________________________________________________________

Re: i have a problem of privilages

From
Richard Broersma Jr
Date:
>  I am not an expert in postgres, may this work for you.
> REVOKE INSERT,UPDATE,DELETE ON ALL from PUBLIC;
> it will take the INSERT,UPDATE,DELETE permmission from all users for all
> objects in the database.
> If you want to give permission for a specific user on all objects
> GRANT ALL on ALL to <user_name>;
> Please make a backup before doing this , good for always
> I am not sure is this is want you want.
> 
> On 7/4/06, Penchalaiah P. <penchalaiahp@infics.com> wrote:
> >
> >  I have 290 tables .. to these tables one schema is there .. that name is
> > public….so I don't know how to create permission to these tables.. either I
> > have to give permissions to individual table.. or I have to give permissions
> > to schema or schema name… if I give permission to schema it has to
> > applicable to all tables..
> > I created one user  with password… then finally I don't know how to
> > allocate permission to him.. please tell me very briefly step by step.. then
> > I can understand…
> > Please tell me if any one knows about this……..

One way to limit which users can access specific database is with the pg_hba.conf file.
You really should spend some time to read it.
http://www.postgresql.org/docs/8.1/interactive/client-authentication.html#AUTH-PG-HBA-CONF

In PostgreSQL 8.1 the concept of "Roles" were added.  A "Role" can be given specific privileges to
the database.  Once this step is complete, database uses can be assigned to this role.  This will
essentially inherit all role privileges to these users.  There is also an important document that
should be read in order to understand it.
http://www.postgresql.org/docs/8.1/interactive/user-manag.html

The SQL syntax for assigning privileges is found here:
http://www.postgresql.org/docs/8.1/interactive/ddl-priv.html

Also finding these topic is very easy also. Simple scan over the table of contents of the manual:
http://www.postgresql.org/docs/8.1/interactive/index.html

And of-course depending on what version of PostgreSQL you have:
http://www.postgresql.org/docs/manuals/

Regards,

Richard Broersma Jr.


Re: i have a problem of privilages

From
Andreas Kretschmer
Date:
MJ Santhosh <mjsanthosh@gmail.com> schrieb:

>  I am not an expert in postgres, may this work for you.
>
> REVOKE INSERT,UPDATE,DELETE ON ALL from PUBLIC;

IIRC, you cant REVOKE ... ON ALL, you need a table-name instead ALL.

But, you can create a script for all tables:
http://people.planetpostgresql.org/greg/index.php?/archives/38-Scripting-with-psql.html

> On 7/4/06, PPeenncchhaallaaiiaahh PP..
<_p_e_n_c_h_a_l_a_i_a_h_p_@_i_n_f_i_c_s_._c_o_m>wrote: 

Please, no silly HTML, and no silly TOFU (german: Text Oben Fullquote
Unten), it means the very silly habit to write the answer above the
question. This is hard to read.

(sorry for my bad english, i know, it's hard to read too)


Andreas
--
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°