Solved

guest User Access

Posted on 2014-03-18
3
363 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 40

Accepted Solution

by:
lcohan earned 250 total points
ID: 39938021
"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:Scott Pletcher
Scott Pletcher earned 250 total points
ID: 39938225
>> 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:Scott Pletcher
ID: 39940499
Hope this helped you out here.  Good luck on future qs.
0

Featured Post

Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Solar Winds can't see SQL Server Express 17 38
Transact SQL - Frequency of Length of Distinct Values 3 26
job schedule 8 21
SQL Find Carriage Return and Delete it. 3 16
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

820 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