Solved

How to pass this error?

Posted on 2006-11-17
7
281 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

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 100 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 42

Accepted Solution

by:
EugeneZ earned 400 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 42

Expert Comment

by:EugeneZ
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Viewers will learn how the fundamental information of how to create a table.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

758 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now