Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to pass this error?

Posted on 2006-11-17
7
Medium Priority
?
294 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Ready to get certified? Check out some courses that help you prepare for third-party exams.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

598 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