Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Reset User Password Without Knowing Original

Status
Not open for further replies.

JeremyNYC

Programmer
Sep 23, 2002
2,688
US
Is there a way for sa/dbo to reset a user's password without knowing the original? I'm an Access/Jet guy, and it's easy peasie over in that world. I've looked around and found sp_password, but that requires the original password.

If there's not a way to do this, doesn't this create all sorts of problems when a user changes his password and then forgets it? Sure I can blow away the user and recreate it, but that seems sort of sloppy.



---
Jeremy Wallace
Up & Running Project Coordinator
Fund for the City of New York
 
In Enterprise Manager, right click on the user, go to "properties" and type the new password in the "password" box.

The users would be located in under "logins" in the "security" folder under your server.



Hope This Helps!

Ecobb

"My work is a game, a very serious game." - M.C. Escher
 
Ecobb,

Thanks for your response.

I should have been more explicit in my first post: I'm looking for a way to do this in VBA or SQL. I've got an Access front end to a SQL Server back end. The front end contains a form that does most of the security tasks available in Enterprise Manager, but not this one. I want clients to be able to do this (reset a user's password w/o knowing the original) without getting into EM (most of them will be running MSDE, so won't have access to EM).

Any thoughts on taking care of it in VBA or SQL?

Jeremy

---
Jeremy Wallace
METRIX Project Coordinator
Fund for the City of New York
 
sp_password has a default value of null for the old password, so it doesn't require the password.

The following commands both worked for me to change the password when I didn't specify the old password.

Code:
exec sp_password  @new='test2', @loginame = 'test'
exec sp_password null, 'test1', 'test'

YOu do have be a system admin though if you don;t know the old password.

Questions about posting. See faq183-874
 
Jeez. Now I feel dumb.

Thanks much for your help SQLSister. Works like a charm. Didn't need to make any changes.

Jeremy

---
Jeremy Wallace
METRIX Project Coordinator
Fund for the City of New York
 
Hey I didn't know either til I went in and read the code for sp_password. Then created a test user to try it on. No need to feel dumb.


Questions about posting. See faq183-874
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top