|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Today @ 7:49 AM
Points: 78,
Visits: 122
|
|
I am working with sql 2008 and using all features of security but not able to understand the need and usage of "sa" account can anyone throw light on it and also the actual use of "public" role which exists in all databases in sql? Thanks
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 8:26 AM
Points: 6,737,
Visits: 11,791
|
|
sa is like the Windows "Administrator" account for the instance. When logged in as sa you can do any action on the instance. Lots of people, including myself, like to disable the Login since it is a well known attack vector. If your instance is in Mixed Security Mode (most are), the sa Login is enabled and someone can crack the password they can gain control of the instance.
The public Database Role is a role all Users are a member of. Think of it as the "Everyone" group you see in Windows. It has limited privileges but all Users are a member of it and they cannot be removed from the Role.
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Today @ 7:49 AM
Points: 78,
Visits: 122
|
|
yes I got your answer but still why public role exists when we have fixed database roles and user defined roles.what are the permission given to this role. and regarding "sa" account when it is best to use this account.
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 8:26 AM
Points: 6,737,
Visits: 11,791
|
|
sej2008 (3/14/2013) yes I got your answer but still why public role exists when we have fixed database roles and user defined roles.what are the permission given to this role. It's like the "Everyone" Windows group. Members of public (i.e. everyone) inherits a base set of permissions all users need in order to work within the database. Things like SELECT on the Catalog View sys.tables.
The public Role can be used to also grant everyone a permission to a User-defined Object. Say you had a Stored Procedure you wanted everyone to be able to execute. You have the option of granting EXEC on that Stored Procedure to public, although that practice is discouraged in favor or creating a User-defined Database Role, granting EXEC on the Stored Procedure to the new Role, and then adding public as a member of the new Role, i.e. do not change the set of permissions granted directly to the public Role.
and regarding "sa" account when it is best to use this account. You would use the sa Login when you needed to access the database instance as an "Administrator." Ideally though, I recommend adding specific Windows Domain Logins to the sysadmin Fixed Server Role and disabling the sa Login for the reasons previously mentioned.
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
SSC Journeyman
      
Group: General Forum Members
Last Login: Today @ 7:49 AM
Points: 78,
Visits: 122
|
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Yesterday @ 5:56 AM
Points: 159,
Visits: 193
|
|
| Just to clarify: When you change to mixed-mode authentication from Integrated Security the 'sa' account is by default disabled. If it is enabled then it is because a SYSADMIN has enabled it.....
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Yesterday @ 5:56 AM
Points: 159,
Visits: 193
|
|
opc.three (3/14/2013) sa is like the Windows "Administrator" account for the instance. When logged in as sa you can do any action on the instance. Lots of people, including myself, like to disable the Login since it is a well known attack vector. If your instance is in Mixed Security Mode (most are), the sa Login is enabled and someone can crack the password they can gain control of the instance.
The public Database Role is a role all Users are a member of. Think of it as the "Everyone" group you see in Windows. It has limited privileges but all Users are a member of it and they cannot be removed from the Role.
Just to clarify: When you change to mixed-mode authentication from Integrated Security the 'sa' account is by default disabled. If it is enabled then it is because a SYSADMIN has enabled it.....
|
|
|
|
|
SSCertifiable
       
Group: General Forum Members
Last Login: Today @ 8:26 AM
Points: 6,737,
Visits: 11,791
|
|
kevaburg (3/20/2013)
opc.three (3/14/2013) sa is like the Windows "Administrator" account for the instance. When logged in as sa you can do any action on the instance. Lots of people, including myself, like to disable the Login since it is a well known attack vector. If your instance is in Mixed Security Mode (most are), the sa Login is enabled and someone can crack the password they can gain control of the instance.
The public Database Role is a role all Users are a member of. Think of it as the "Everyone" group you see in Windows. It has limited privileges but all Users are a member of it and they cannot be removed from the Role.Just to clarify: When you change to mixed-mode authentication from Integrated Security the 'sa' account is by default disabled. If it is enabled then it is because a SYSADMIN has enabled it..... That is not my experience but I waited to respond so I could verify. When switching from Windows Authentication Mode to Mixed Mode the status of the sa Login is not changed. If it was enabled before the change it stays enabled.
__________________________________________________________________________________________________ There are no special teachers of virtue, because virtue is taught by the whole community. --Plato
Believe you can and you're halfway there. --Theodore Roosevelt
Everything Should Be Made as Simple as Possible, But Not Simpler --Albert Einstein
The significant problems we face cannot be solved at the same level of thinking we were at when we created them. --Albert Einstein
1 apple is not exactly 1/8 of 8 apples. Because there are no absolutely identical apples. --Giordy
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Yesterday @ 5:56 AM
Points: 159,
Visits: 193
|
|
| Good point. I actually just wanted to say that if was disabled in Windows authentication it would remain disabled in mixed-mode. You have cleared that point up!
|
|
|
|