dbTalk Databases Forums  

SQL Server 2005 / securityadmin role / SSMS

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss SQL Server 2005 / securityadmin role / SSMS in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Larry Bertolini
 
Posts: n/a

Default SQL Server 2005 / securityadmin role / SSMS - 05-08-2007 , 03:10 PM






Experiencing a little weirdness with SQL Server Management Studio...

Have created a login, that has fixed server role "securityadmin".
The login can create/drop logins, add/remove them as users in
databases, etc.

The login can change another login's password, using SQL
from a query window (e.g. alter login bob with password='abc')

However, the login *cannot* change another login's password,
using SSMS GUI (e.g. "Security", "Logins", double-click "Bob",
change password, say "OK"). The error text is:

Change password failed for Login 'Bob'. (Microsoft.SqlServer.Smo)

Additional information:
An exception occurred while executing a Transact-SQL statement or
batch.
(Microsoft.SqlServer.ConnectionInfo)
Cannot alter the login 'Bob', because it does not exist or you do
not have permission.
(Microsoft SQL Server, Error: 15151)

Has anybody else experienced this?

Reply With Quote
  #2  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SQL Server 2005 / securityadmin role / SSMS - 05-08-2007 , 05:16 PM






Larry Bertolini (bertolini.1 (AT) osu (DOT) edu) writes:
Quote:
Have created a login, that has fixed server role "securityadmin".
The login can create/drop logins, add/remove them as users in
databases, etc.

The login can change another login's password, using SQL
from a query window (e.g. alter login bob with password='abc')

However, the login *cannot* change another login's password,
using SSMS GUI (e.g. "Security", "Logins", double-click "Bob",
change password, say "OK"). The error text is:

Change password failed for Login 'Bob'. (Microsoft.SqlServer.Smo)
A great thing with Mgmt Studio is that you can always script actions.
Press the Script button, and you can get a query window with the
T-SQL command that Mgmt Studio would generate if you were to press OK.

In this case you will see that the generated command includes the
OLD_PASSWORD clause. And if you supply the correct old password
for the user, it works.

I'm a little puzzled, because Books Online says:

If the login is a member of the sysadmin fixed server role or a grantee
of CONTROL SERVER permission, also requires CONTROL SERVER permission
when making the following changes:

o Resetting the password without supplying the old password.

But very apparently ALTER ANY LOGIN (which is what securityadmin maps to)
is sufficient to change the password.

So it seems that Books Online is wrong, but the Tools group were naïve
enough to believe it.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
  #3  
Old   
Larry Bertolini
 
Posts: n/a

Default Re: SQL Server 2005 / securityadmin role / SSMS - 05-08-2007 , 09:25 PM



On Tue, 8 May 2007 22:16:48 +0000 (UTC), Erland Sommarskog
<esquel (AT) sommarskog (DOT) se> wrote:


Quote:
In this case you will see that the generated command includes the
OLD_PASSWORD clause. And if you supply the correct old password
for the user, it works.
That's kind of an odd design decision, IMO, considering that
"user forgot password" is probably the most common reason
that a securityadmin would change a password; at that point,
nobody knows the old password.

Oh, well. Thanks for the tip about the "Script" button.


Reply With Quote
  #4  
Old   
Erland Sommarskog
 
Posts: n/a

Default Re: SQL Server 2005 / securityadmin role / SSMS - 05-10-2007 , 05:14 PM



Larry Bertolini (bertolini.1 (AT) osu (DOT) edu) writes:
Quote:
On Tue, 8 May 2007 22:16:48 +0000 (UTC), Erland Sommarskog
esquel (AT) sommarskog (DOT) se> wrote:
In this case you will see that the generated command includes the
OLD_PASSWORD clause. And if you supply the correct old password
for the user, it works.

That's kind of an odd design decision, IMO, considering that
"user forgot password" is probably the most common reason
that a securityadmin would change a password; at that point,
nobody knows the old password.
Good point. I was a little uncertain what to file a bug for, but you are
right. What's the point with being permitted to change logins, if you
cannot help people who have forgotten their password. I filed a bug
at
https://connect.microsoft.com/SQLSer...dbackID=276639

and I also sent in feedback on the topic in Books Online.


--
Erland Sommarskog, SQL Server MVP, esquel (AT) sommarskog (DOT) se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.