Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / General / Security / March 2008

Tip: Looking for answers? Try searching our database.

Creating new user default to DB_owner role

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jacques - 27 Mar 2008 14:27 GMT
When I create a new SQL login via SSMS the user gets assigned db_owner role
by default. This only happens on the one database.

Removing the db_owner role during creation of the user causes SSMS to fail
with an error because it tries to remove the user that is being created from
the db_owner role.

Any suggestions?
Uri Dimant - 27 Mar 2008 15:04 GMT
Jacgues
Wait, lets do it step by step. If I create a  sql login (via SSMS) it does
not happen assign db_owner role, perhaps  you meant when  you try to map the
logi to the user on one of the database? Then it gets dbo as default schema
, but it is not a memeber of db_owner role. is it?

> When I create a new SQL login via SSMS the user gets assigned db_owner
> role
[quoted text clipped - 6 lines]
>
> Any suggestions?
Jacques - 27 Mar 2008 15:17 GMT
Hi Uri
You are right, when mapping the new login to a user in the database it gets
assigned the dbo schema. This is correct. However, in this instance the user  
gets the db_owner database role and public database role as the default roles.

My understanding is that it should only get public as the default role.

> Jacgues
> Wait, lets do it step by step. If I create a  sql login (via SSMS) it does
[quoted text clipped - 12 lines]
> >
> > Any suggestions?
Erland Sommarskog - 28 Mar 2008 00:21 GMT
> When I create a new SQL login via SSMS the user gets assigned db_owner
> role by default. This only happens on the one database.
>
> Removing the db_owner role during creation of the user causes SSMS to
> fail with an error because it tries to remove the user that is being
> created from the db_owner role.

A DDL trigger that adds all new users to db_owner?

Does the same happen if you run CREATE USER from a query window?

Signature

Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.