Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Data Management

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

    Search

    XML Feeds

    Google Ads

    « Collation conflicts with temp tables and table variables.SQL Server collation conflicts »
    comments

    A while back I wrote, “To SA or not to SA”. That blog touched my security side that I take very seriously in my database server landscape. I’m glad to have seen so many read the blog in hopes it brought attention to the SA account where it may have been overlooked. In a reply to one of the comments I touched on another default setting for SQL Server regarding the BUILTIN\ Administrators group. BUILTIN\Administrators is created by default on windows operating systems. This group has little to no limitations on the OS and application installations on the server.

    So to put it as slightly as I did with SA…

    If you are on SQL Server 2008 and upgraded by using a fresh install, you do not have to worry about the BUILTIN\ Administrators group. As SQL Server has evolved and the security has become more advanced, security has been tightened out of the box. I applaud the SQL Server 2008 teams for these changes. Taking this and many other bad practices out of the default settings has pushed SQL Server even farther into the enterprise group.

    Most database installations are not easily upgraded of course. I know a few DBAs I communicate with often that even have compatibility levels pre-dating 80 in their respected environments. My own landscape is composed 90% of SQL Server 2005 and plans for 2008 across the board are not slated until Q2, 2010. So if you have SQL Server 2005 or are restricted in use to pre-2008, the BUILTIN\Admin group is still of much concern.

    Taking a look…

    To check your BUILTIN\ Administrators group and the server role you can do few things.

    Open SSMS, connect to a 2005 or 2000 instance and expand the Security node.

    Double click the group and select the Server Roles window.

    Note the sysadmin checkbox and it being checked. This is from an instance installed with no pre-configurations in mind.

    To do this in T-SQL we can run one of a few system procedures or query off the system tables.

    Option 1)

    1. sp_helpsrvrole 'sysadmin'

    This will show you all members of the sysadmin server roles. Very handy audit tool and one I reported to SOX auditors often with.

    For query abilities, Denis Gobo also has a handy query on the syslogins here
    http://wiki.lessthandot.com/index.php/Find_Out_Server_Roles_For_a_SQL_Server_Login

    In Denis’s Wiki entry there is a query at the end that gives us exactly what we need here also

    1. SELECT [name],sysadmin,bulkadmin
    2. FROM master..syslogins
    3. WHERE sysadmin =1 or bulkadmin =1

    This will show us everyone in the sysadmin role.

    So what’s the problem?

    The primary problem with leaving the BUILTIN\Admin group in the sysadmin role is it has no control. This leads into most windows server installations that have Domain Admins as local administrators on the servers. This brings you to the point of having all Domain Admins as sysadmin’s on your database servers. Several problems arrise from this sitaution. Database creations without control, server connections that can cause problems and security gaps to other instances, monitoring concerns and many more uncontrolled issues.

    Solution…

    There is only one real solution and it starts with the DBA. Here are a few things as a DBA you should think about while either installing a fresh instance or upgrading.

    1. After installing SQL Server pre-2008, the first thing is to remove BUILTIN\Admin from the sysadmin role. It is ok to leave the group as public
    2. When upgrading and transferring security accounts, determine if the BUILTIN\Admin group is truly required. Prevent moving the group to 2008 when the practice has been removed.
    3. Implement scanning for new instance installations that leave these security gaps open.
    4. Make it a practice to monitor your security. This includes instances you have already tightened up. Automate scripts to send out reports of the groups and roles on your SQL Servers for review. I do this with SSRS minimum of once a week
    5. Take a sound mind while installing SQL Server and take security seriously! Point of failure one on most installations is when you allow everything to take complexity out of the initial security settings.

    About the Author

    Ted Krueger is a SQL Server MVP and has been working in development and database administration for 13+ years. Specialties range from High Availability and Disaster / Recovery setup and testing methods down to custom assembly development for SQL Server Reporting Services. Ted blogs and is also one of the founders of LessThanDot.com technology community. Some of the articles focused on are Backup / Recovery, Security, SSIS and working on SQL Server and using all of the SQL Server features available to create stable and scalable database services. @onpnt Personal Blog over at http://onpnt.wordpress.com/
    Social SitingsTwitterLinkedInLTD RSS Feed
    4019 views
    InstapaperVote on HN

    4 comments

    Comment from: Chris Randall [Visitor] · http://blogs.ameriteach.com
    Chris Randall Nice post. Thanks for writing it up.
    11/19/09 @ 09:24
    Comment from: Naomi Nosonovsky [Member]
    Naomi Nosonovsky Great blog - thanks.
    11/19/09 @ 09:48
    Comment from: daspeac [Visitor]
    daspeac Hi all, as far as I see, some of us regularly encounter database corruption issues. I'd like to suggest a good way out against various errors, caused by MSSQL databases. I am talking about the best sql database repair tool program, it quickly eliminates error messages, it can be found at: http://www.recoverytoolbox.com/microsoft_sql_server_database_repair_tool.html
    11/19/09 @ 12:38
    Comment from: Davidpoul [Visitor]
    Davidpoul Nice post. Thanks
    11/22/09 @ 23:30

    Leave a comment


    Your email address will not be revealed on this site.

    To mislead the spambots.

    Your URL will be displayed.
    (Line breaks become <br />)
    (Name, email & website)
    (Allow users to contact you through a message form (your email will not be revealed.)