Re: giving a user the ability to add logins and users to a database

From: Sue Hoegemeier (Sue_H_at_nomail.please)
Date: 04/27/04


Date: Mon, 26 Apr 2004 16:56:13 -0600

Sorry...don't know what else to suggest. There are no
special server or database configurations, options needed to
allow a member of db_accessadmin to execute
sp_grantdbaccess.

-Sue

On Mon, 26 Apr 2004 06:09:57 -0700, "Matt"
<mattcioffi@crd.com> wrote:

>I rechecked everything and it does not work. Are there
>any server configurations or database options that need to
>be set? I will delete the new user and login and try one
>more time but I have tried everything and it still gets
>Server: Msg 15247, Level 16, State 1, Procedure
>sp_adduser, Line 35
>User does not have permission to perform this action.
>login has security administrator server role, the user in
>the database has accessadmin, securityadmin, and at
>various times other roles in the database like db_owner
>and it still will not allow this to work.
>
>
>
>>-----Original Message-----
>>It works. I'm not sure what you missed - double check the
>>databases where you wanted to grant the permissions for
>the
>>new user you created - make sure you were in the correct
>>database. Also double check the database where the new
>user
>>is trying to add users and make sure they are executing
>the
>>procedures in the correct database.
>>As an example, for SomeLogin to be able to add logins and
>>users you would use something like:
>>sp_addlogin 'SomeLogin', 'SomePassword'
>>or
>>sp_grantlogin 'SomeLogin'
>>
>>go
>>sp_addsrvrolemember 'SomeLogin', 'securityadmin'
>>go
>>use YourDatabase
>>go
>>sp_grantdbaccess 'SomeLogin'
>>go
>>sp_addrolemember 'db_accessadmin', 'SomeLogin'
>>go
>>
>>Then when SomeLogin logs into SQL Server, they can
>execute:
>>sp_addlogin 'NewUser', 'SomeOtherPassword'
>>or
>>sp_grantlogin 'NewUser'
>>
>>go
>>use YourDatabase
>>go
>>sp_grantdbaccess 'NewUser'
>>go
>>
>>-Sue
>>
>>On Thu, 22 Apr 2004 14:03:40 -0700,
>><anonymous@discussions.microsoft.com> wrote:
>>
>>>This does not work. I just created a user gave it
>>>security admin role on the server and then gave it both
>>>accessadmin and securityadmin. I get permission denied
>>>when I try to add the user.
>>>
>>>Please help.
>>>>-----Original Message-----
>>>>Members of the server role securityadmin can add logins,
>>>>grant access to Windows logins.
>>>>Members of the database roles db_owner and
>db_accessadmin
>>>>can grant access to the databases in which they are
>>>members
>>>>of that role.
>>>>
>>>>-Sue
>>>>
>>>>On Thu, 22 Apr 2004 13:01:35 -0700, "Matt."
>>>><mattcioffi@crd.com> wrote:
>>>>
>>>>>I need to give a user the ability to create logins and
>>>>>then add that login to a database. Is it possible to
>do
>>>>>this without granting System Administrator Role? I
>>>cannot
>>>>>seem to do this any other way then giving the user
>>>>>sysadmin. Any help would be greatly apperciated.
>>>>>
>>>>>Thanks.
>>>>
>>>>.
>>>>
>>
>>.
>>



Relevant Pages

  • Create SharePoint Portal failed.
    ... One mentioned ensuring that SQL Server uses a case ... 13:55:40 Service database server is 'USDC-JOHRIV'. ... Update dbo.propertylist set DisplayName = N'Last name' ...
    (microsoft.public.sharepoint.portalserver)
  • Re: ADO Connection Timeout
    ... to the central server, but you are willing to live with periods where it ... i.e. a local database or even a text file. ... to function until the connection can be restored to the server. ...
    (microsoft.public.data.ado)
  • Web Developers - Happy Hearts And HDTV! - Lockergnome
    ... Certificate on your MSIIS Web server. ... getting data from a database is only half the problem. ... Zend recently started a series about building rock solid code in PHP. ... which provides bulk database conversion. ...
    (freebsd-questions)
  • Re: Static library works everywhere but server
    ... I installed sqlite database on FreeBSD. ... headers" 500 error. ... it works correctly on the server. ... execute the CGI, setting up the environment variables just as Apache ...
    (comp.unix.programmer)
  • Re: What commands can a user execute
    ... the query - yes, I'm aware of it - either at the Server or Database scope, no ... full list of SQL commands that a user can execute but, so far, it has not. ... mapped to any server roles but is a db_owner in almost all databases. ...
    (microsoft.public.sqlserver.security)

Quantcast