question

Sagar Bhargava avatar image
Sagar Bhargava asked

SQL Server Security

Hi, I have a user who is able to connect to a database but I dont see the login on the server or in the database. The database has only 4 logins (3 AD groups and 1 SQL Login). The AD groups do not have any logins added at present and the SQL Login has db_reader permission on the database. The user is able to create / modify objects. Other AD groups on the server do not have the user login added. This is something which I cannot explain so if anyone can provide more information on how I can find out whats happening, would be great. I am using SQL Server 2012 SP3 CU8 on Windows 2012 R2. Thanks.
securitypermissions
3 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

nidheesh.r.pillai avatar image nidheesh.r.pillai commented ·
" The AD groups do not have any logins added at present " - How did you verify this?
0 Likes 0 ·
JohnM avatar image JohnM commented ·
Are the databases contained?
0 Likes 0 ·
Sagar Bhargava avatar image Sagar Bhargava commented ·
@nidheesh - I used the xp_logininfo and I have access to AD server so I can login and check the groups as well. @JohnM - No, it is not a contained database. The database is on a 3 node failover cluster where we have an availability group setup but this database is not a part of it.
0 Likes 0 ·

1 Answer

·
Jeff Moden avatar image
Jeff Moden answered
Use xp_LoginInfo 'adgroupnamehere', 'members' to see who is in each AD group. Don't forget about special groups such as the 'BUILTIN\Administrators' account, etc, etc.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sagar Bhargava avatar image Sagar Bhargava commented ·
Yes, I checked this and could not find any logins.
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.