How to add back the BUILTIN\Administrators group?

  • Hi,

         Due to security reasons I removed the group BUILTIN\Administrators from SQL Server 2005 .... (I removed the group, just just removed sysadmin role from the group). If someone really wants it back, is there a simple way to add it back? Appreciate your help ...

    Thanks,

    Del Piero

  • Heh... I'm thinking that those types of questions should be posed and answered BEFORE such action is taken.

    I'm a bit confused by your statment of (I removed the group, just just removed sysadmin role from the group).   Did you remove the group or just remove the SysAdmin role from the group?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Sorry I mean to say, I removed the group and NOT just removed sysadmin role from the group.....

    Thanks,

    Del Piero

  • From everything I could find, you just add it back in as you would any other... the caveat may be that it might be case sensistive.  It would also need "SA" privs to be "fully" restored.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • I saved this snippet for SQL2000, so i would assume it would still be valid in 2005; hope this helps:

    USE master

    go

    EXEC sp_grantlogin 'BUILTIN\Administrators'

    go

    EXEC sp_defaultdb 'BUILTIN\Administrators', 'master'

    go

    EXEC sp_defaultlanguage 'BUILTIN\Administrators', 'us_english'

    go

    EXEC sp_addsrvrolemember 'BUILTIN\Administrators', 'sysadmin'

    go

    IF EXISTS (SELECT * FROM master.dbo.syslogins WHERE loginname='BUILTIN\Administrators')

        PRINT '<<< CREATED LOGIN BUILTIN\Administrators >>>'

    ELSE

        PRINT '<<< FAILED CREATING LOGIN BUILTIN\Administrators >>>'

    go

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Jeff's caveat is correct. We have a couple of Binary instances and case sensitivity is definitely something to watch out for.

    RegardsRudy KomacsarSenior Database Administrator"Ave Caesar! - Morituri te salutamus."

  • Thanks much!

    Del Piero

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply