Re: User added via group membership

From: Dan Guzman (danguzman_at_nospam-earthlink.net)
Date: 07/22/04


Date: Wed, 21 Jul 2004 21:40:26 -0500


> Why would it
> allow the GRANT if it's not a valid login? How would they
> be able to execute the procedure without a valid login?

The user obviously cannot execute the procedure or perform any other SQL
activity until the account has been granted access to SQL Server. However,
SQL Server allows you to setup security for Windows accounts even before
access has been granted. This is possible because, unlike standard SQL
logins, the Windows account SID can be obtained independently of SQL Server.

Now this doesn't necessarily mean that you should do this as a rule. IMHO,
it's better to setup security in correct dependency order (login --> user-->
permissions).

-- 
Hope this helps.
Dan Guzman
SQL Server MVP
"Colleen" <anonymous@discussions.microsoft.com> wrote in message
news:140901c46f2c$65fa6790$a401280a@phx.gbl...
> I just stumbled upon something I thought was odd.
>
> I created a stored procedure and issued 'GRANT EXECUTE ON
> <procedure> to <domain\windowslogin>.  The login did not
> exist on the server but it added a user into the
> database 'via group membership'.  The user later tried to
> register the server in Enterprise Manager and of course
> got an error that he didn't have a login.  Why would it
> allow the GRANT if it's not a valid login?  How would they
> be able to execute the procedure without a valid login?
>
>


Relevant Pages

  • Re: Error in SQL Server 2008 Installation
    ... Ekrem Onsoy - SQL Server MVP ... '' is not a valid login or you do not have permission. ... Configuration error description: '' is not a valid login or you do not ...
    (microsoft.public.sqlserver.setup)
  • RE: Exporting data to another server
    ... Hi Walt, ... Please make sure that the domain account you used to connect to SQL Server ... is a valid login in both servers. ...
    (microsoft.public.sqlserver.security)
  • Re: Error in SQL Server 2008 Installation
    ... I suggest you to turn it off before start installing SQL Server and then turn it on after the Setup completes. ... '' is not a valid login or you do not have permission. ... Configuration error description: '' is not a valid login or you do not ...
    (microsoft.public.sqlserver.setup)
  • Re: SQL Server User
    ... you need a valid Login which is mapped to your User object in your database so that your user can log in to the SQL Server instance using that Login and Database User. ... now I am not able to access database with myuser in sql server where I ...
    (microsoft.public.sqlserver.connect)