none
What is use of Guest Account ?

    Question

  • Hi All,

    What is the Guest account in SQL Server 2K,2k5 and above?

    What is the use of this account? Do we really need this account?

    When does sql uses this account ?

    What if we disable account ? What will if i disable it ?

    Can anyone give brief and precise explaination.

    Thank you in Advance.

    Sunday, March 24, 2013 3:55 AM

Answers

  • The purpose of the guest user is to allow logins authenticated at the server level to access databases even though they have not been explicitly granted database access as database users.  System databases like master and tempdb require the guest user to be enabled so that all logins can use these databases.  The guest account is disabled by default in user databases. 

    Note that the guest user inherits only limited public role permissions.  The only reason I've found to enable the guest account in user databases is to avoid the need to explicitly add users to indirectly referenced databases in a cross-database ownership chaining scenario. 


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    Sunday, March 24, 2013 5:20 AM
  • It is recommended to disabled to guest account.  Example : Database 'Test'. Guest Account is enabled on 'Test' database. UserA is not an assigned database user on Test database. Ideally, you do not want UserA to connect to the database but since the database guest account is enabled, the UserA can connect to database as guest and do whatever permissions guest account has.

    As much as I can think, guest account may be useful for 'Utility' databases  where everybody are okay access the database objects but again you have to double check before you decide on that.


    Hope it Helps!!



    Sunday, March 24, 2013 4:25 AM

All replies

  • It is recommended to disabled to guest account.  Example : Database 'Test'. Guest Account is enabled on 'Test' database. UserA is not an assigned database user on Test database. Ideally, you do not want UserA to connect to the database but since the database guest account is enabled, the UserA can connect to database as guest and do whatever permissions guest account has.

    As much as I can think, guest account may be useful for 'Utility' databases  where everybody are okay access the database objects but again you have to double check before you decide on that.


    Hope it Helps!!



    Sunday, March 24, 2013 4:25 AM
  • The purpose of the guest user is to allow logins authenticated at the server level to access databases even though they have not been explicitly granted database access as database users.  System databases like master and tempdb require the guest user to be enabled so that all logins can use these databases.  The guest account is disabled by default in user databases. 

    Note that the guest user inherits only limited public role permissions.  The only reason I've found to enable the guest account in user databases is to avoid the need to explicitly add users to indirectly referenced databases in a cross-database ownership chaining scenario. 


    Dan Guzman, SQL Server MVP, http://www.dbdelta.com

    Sunday, March 24, 2013 5:20 AM
  • Thank you Stan and Dan.
    Sunday, March 24, 2013 4:26 PM