[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

How to pass this error?

Posted on 2006-11-17
7
Medium Priority
?
297 Views
Last Modified: 2012-08-13
I am user with dbo,db_securityadmin roles. I am trying to change passwords , i run into following erroe, do i need to be a SA?



Server: Msg 15210, Level 16, State 1, Procedure sp_password, Line 20

Only members of the sysadmin role can use the loginame option. The password was not changed
0
Comment
Question by:crishna1
  • 3
  • 2
  • 2
7 Comments
 
LVL 29

Expert Comment

by:Nightman
ID: 17968460
Yes, you need to be a sysadmin to change the password of another user with this procedure
0
 

Author Comment

by:crishna1
ID: 17968479
does'nt server level role "security administrators" let you do this, let me try.
0
 
LVL 29

Expert Comment

by:Nightman
ID: 17968560
If you are using SQL 2005, you can try
ALTER LOGIN LoginName WITH PASSWORD = 'password';
or
ALTER LOGIN LoginName WITH OLD_PASSWORD = 'oldpassword', PASSWORD = 'password';

Not sure if you need to be a sysadmin to do this though. I suspect that if you have the old password, the extra permissions check is ignored (sorry, don't have 2005 with me right now).

sp_password can be run for any user in context of their own account.
0
2018 Annual Membership Survey

Here at Experts Exchange, we strive to give members the best experience. Help us improve the site by taking this survey today! (Bonus: Be entered to win a great tech prize for participating!)

 

Author Comment

by:crishna1
ID: 17968647
I am using Sql Serv 2000,

sp_password @new = 'XXXX', @loginame = 'sa'

Server: Msg 15210, Level 16, State 1, Procedure sp_password, Line 20

Only members of the sysadmin role can use the loginame option. The password was not changed
0
 
LVL 29

Assisted Solution

by:Nightman
Nightman earned 300 total points
ID: 17968689
From Books Online:

Execute permissions default to the public role for a user changing the password for his or her own login.
Only members of the sysadmin role can change the password for another user's login.

So no, you cannot change it without being a member of the sysadmin role. And you CERTAINLY cannot change the password for the sysadmin without being a sysadmin yourself!
0
 
LVL 43

Accepted Solution

by:
Eugene Z earned 1200 total points
ID: 17973372
try  sql server server role: "Security Administrators" :

Security Administrators (securityadmin) Designed for users who need to manage logins, create database permissions, and read error logs. Members of this role can add members to securityadmin; grant, deny, and revoke CREATE DATABASE; and read the error logs. In addition, they can also perform these tasks: sp_addlinkedsrvlogin, sp_addlogin, sp_defaultdb, sp_defaultlanguage, sp_denylogin, sp_droplinkedsrvlogin, sp_droplogin, sp_grantlogin, sp_helplogins, sp_remoteoption, and sp_revokelogin.

http://www.microsoft.com/technet/prodtechnol/sql/2000/books/c05ppcsq.mspx
0
 
LVL 43

Expert Comment

by:Eugene Z
ID: 17973390
sp_password
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_sp_pa-pz_5x44.asp

Permissions
Execute permissions default to the public role for a user changing the password for his or her own login. Members of the securityadmin and sysadmin fixed server roles can change the password for another user's login.                                                                                                                                  /\
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
Microsoft provides a rich set of technologies for High Availability and Disaster Recovery solutions.
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
Stellar Phoenix SQL Database Repair software easily fixes the suspect mode issue of SQL Server database. It is a simple process to bring the database from suspect mode to normal mode. Check out the video and fix the SQL database suspect mode problem.

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question