public user .. insert permission

  • when I run following query in sql 2005:

    select a.*,name, b.*

    from sys.database_principals a, sys.database_permissions b

    where permission_name = 'INSERT'

    and

    b.grantee_principal_id = a.principal_id

    GO

    I get a record back with where the name column is public. I am wondering what does that mean? does public has insert permission.. if it does then to what object??

  • When you check the Security folder under that database, is there a "Public" user there? If so, what roles are configured? That is not a SS default.

  • pubic is a role that should not have permissions assigned. That query returns nothing for my instances, which leads me to believe someone has assigned permissions on your server.

    If I run this

    GRANT INSERT ON Person.Address TO Public

    REVOKE INSERT ON Person.Address TO Public

    and run your query in between and after, I get Public in the middle and nothing after.

    If look, there is a major_object_id column. Take that and substitute for the number below to get the object.

    SELECT OBJECT_NAME(85575343)

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply