sp_password | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

sp_password

I would like to give users of my application to be able to reset another user’s password. I wanted to use sp_password but the user that is logged in must be part of sysadmin role (why not security admin???). Is there any other stored procedure that can do this? Is there any way around the sysadmin issue? Thanks Daniel Reber
Datamasters, Inc
You might be able to wrap a stored procedure around sp_password, and then give the user specific permission to run this SP. I have not tried this, so I don’t know if it will work or not. —————————–
Brad M. McGehee, MVP
Webmaster
SQL-Server-Performance.Com
Adding the users to the Security administrators should sufficient… I created two users test1 and test2, added test2 to the Security Administrators group, and was able to change test1’s password using the test2 account. the syntax for sp_password is a little funny though since test2 has to put its own password in as the old_password Cheers
Twan PS this won’t work with Integrated Security accounts though, as this must be done at the NT side
Thanks for the post Twan. I am getting different results, if I try resting a password with a user that is part of security admin role, I get an error if a try to use it’s password for the @old paramter. If I don’t specify one then it works. I originally tested this on a different server, could this be a service pack issue? Daniel Reber
Datamasters, Inc
Ensure the correct OLD parameter is used and if you haven’t specified the one then it treats that value as NULL and proceeds to update the Password. What is the level of service packs on those 2 machines where you’d tried? Satya SKJ
Moderator
http://www.SQL-Server-Performance.Com/forum
This posting is provided “AS IS” with no rights for the sake of knowledge sharing.
also if the user that is part of the security admin role uses integrate security (ie an NT account rather than a SQL account) then you need to supply NULL for the password Cheers
Twan
]]>