Solved

How to pass this error?

Posted on 2006-11-17
7
286 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
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 

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:
Eugene Z 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: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

Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Copy data to New Year 9 33
Converting Stored Procedure to SQL Statement 5 44
UPDATE JOIN multiple tables 5 23
Need to find substring in SQL 3 14
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

730 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