View all users in master.dbo.syslogins

  • How is it possible to allow a user with only the public role to view all users in the master.dbo.syslogin view?

    Is this possible?

  • views can be accessed I Guess with any privilages.

    [font="Tahoma"]
    --SQLFRNDZ[/url]
    [/font]

  • It's not that it's not accessible. The issue is if you run the below command under the context of a user that only has public permissions you will not retrieve all users in the syslogins table.

    How can you get a user withuot dbo/sysadmin rights to view all users?

    select * from master.dbo.syslogins

  • Found the answer.

    You have two options:

    1. GRANT VIEW ANY DEFINITION (not recommended)

    2. GRANT VIEW DEFINITION ON LOGIN::User1 TO User2

    User1 will be the user you want to view the metadata of and User2 is the user who should have access to view the data.

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

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