Solved

guest User Access

Posted on 2014-03-18
3
359 Views
Last Modified: 2014-03-19
Hi,

Is there a query I can run to determine which permissions the guest account has? Would it be considered an exception if the guest has access to master, msdb, and tempdb?

Thanks!

--
Vic
0
Comment
Question by:VicBel
  • 2
3 Comments
 
LVL 39

Accepted Solution

by:
lcohan earned 250 total points
Comment Utility
"You should not disable the guest user in the msdb database in SQL Server'

http://support.microsoft.com/kb/2539091

"how to find guest account is enabled or disabled sql server"
https://sites.google.com/site/jayantdass/how-to-find-guest-account-is-enabled-or-disabled-sql-server
0
 
LVL 69

Assisted Solution

by:ScottPletcher
ScottPletcher earned 250 total points
Comment Utility
>> is there a query ... <<

Takes more of a mini-script, like below, to make sure you include all permissions that might have been given to the guest account:

USE msdb

DECLARE @guest_principal_id int
SELECT @guest_principal_id = principal_id
FROM sys.database_principals
WHERE
    name = 'guest'

SELECT *
FROM sys.database_permissions dp
WHERE
    dp.grantee_principal_id = @guest_principal_id

SELECT dp.name
FROM sys.database_role_members drm
INNER JOIN sys.database_principals dp ON
    dp.principal_id = drm.role_principal_id
WHERE
    drm.member_principal_id = @guest_principal_id


>> Would it be considered an exception if the guest has access to master, msdb, and tempdb? <<

No, and you don't want to remove "CONNECT" permission from guest to any of those databases (unless, I guess, you're absolutely certain you know what you're doing and that it won't cause an issue, but only a very experienced DBA should even try it).
0
 
LVL 69

Expert Comment

by:ScottPletcher
Comment Utility
Hope this helped you out here.  Good luck on future qs.
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now