Re: Duplicate an existig SQL user login account

From: Tony Sebion (tony_at_sebion.com)
Date: 09/26/05

  • Next message: Sue Hoegemeier: "Re: Is there a log of activity as compared to the Tran log?"
    Date: Mon, 26 Sep 2005 18:15:39 +0000
    
    

    You might be able to get what you want by "Generating SQL Script" from
    the right-click context menu on the database you want to add the user
    to. Place the checkmarks on the first tab to create all types of
    objects, uncheck the options to create the CREATE and DROP statements on
    the second tab, and go to the 3rd tab and check "Script object-level
    permissions".

    When you build the script, it should include commands that grant the
    permissions to the current account that holds the permissions. You will
    have to manually pick through the script commands to find the
    appropriate ones and change the name of the user to replace the old
    user's username with the new one to build an entirely new script.

    While not the answer you're looking for, I think you should consider
    creating one or more roles configured to grant permissions that match
    the account that is configured properly now, then create the new account
    and add the both user accounts to the role you created.

    Good luck,
    Tony Sebion

    "John Williams" <JohnWilliams@discussions.microsoft.com> wrote in
    message news:5EA1D83E-15E9-44B9-9707-C4AAB5C9CDB6@microsoft.com:

    > How does one create a copy of an existing SQL login account. I have a
    > database that has a single login with everything setup. I just want to be
    > able to copy the existing account to a new user so I can set a different
    > password.
    >
    > Thanks!


  • Next message: Sue Hoegemeier: "Re: Is there a log of activity as compared to the Tran log?"

    Relevant Pages

    • Re: Knowledge Base Article - 815154 Configure SQL Server Security for .NET Applications
      ... db_ roles were inclusive in this context and I'll find the script very ... >> Do I as the admin have to check each and every object one at a time? ... > your application references nor what permissions ... > the user to the fixed db_datareader database role. ...
      (microsoft.public.sqlserver.security)
    • Re: User access & security
      ... If there is a user with non-root access to their account, we are dependent on their having a good password to ward off too much nasty activity. ... to do (permissions permissions permissions)). ... lately most attacks against webservers seem to target vulnerable php, perl script and spawn a custom script, ... which is located at some anonymous or compromised server, which launches a reverse shell so ... ...
      (comp.os.linux.security)
    • Re: Same Server and DB - Copy users and roles
      ... > The script generator worked great with one exception. ... The permissions set ... > the roles were not transferred along with the role to the new database. ... >> Dejan Sarka, SQL Server MVP ...
      (microsoft.public.sqlserver.security)
    • Re: Entourage account setup applescript not working
      ... I pasted the script at the end just in case. ... When comparing the account settings on 2 computers, ... This script assists a user with the setup of his Exchange account ... Customize the network and server properties below with information ...
      (microsoft.public.mac.office.entourage)
    • Re: Error 15401 using sp_grantlogin (not addressed by current KB articles)
      ... Restarting Windows 2000 resolved the problem for this particular account, ... confused when it sees a duplicate SID. ... > One way to get SQL Server to agree with the renamed NT ... > Preview (to ensure the script was created), ...
      (microsoft.public.sqlserver.security)