Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Administration (2000)
 sp_password question?

Author  Topic 

bbasir
Yak Posting Veteran

76 Posts

Posted - 2008-04-04 : 13:25:29
I am trying to change password, using the code below.. The code below is in a stored proc and I am passing these parameters from a web application.....

sp_password [ [ @old = ] 'old_password' , ]
{ [ @new =] 'new_password' }
[ , [ @loginame = ] 'login' ]



sp_password 'cust1','cust2','cust1'

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.


I made my user part of the db_securityadmin role, but that does not help...

How can I give the above mentioned permissions, so that when user cust1 logs on then he can chnage his own password from the web application as long he has given his old password correctly?

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-04-04 : 13:33:21
You can't change Sa password unless you are Sysadmin.? Do you have sysadmin permission? If you are Sysadmin , don't give users sysadmin to change Sa password. Otherwise, they will show you door with yours batch and pagers revoked.
Go to Top of Page

bbasir
Yak Posting Veteran

76 Posts

Posted - 2008-04-04 : 13:56:57
I am only allowing the users to change his password, they will not be able to change any one else's password?
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-04-04 : 14:16:58
That is only done by DBA.
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-04-04 : 23:54:16
User can change own password with sp_password, don't specify login.
Go to Top of Page

sodeep
Master Smack Fu Yak Hacker

7174 Posts

Posted - 2008-04-05 : 12:40:19
Is this production server or Dev server?
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-04-05 : 21:35:21
Doesn't matter, user should be able to change own password.
Go to Top of Page

bbasir
Yak Posting Veteran

76 Posts

Posted - 2008-04-07 : 16:56:42
Thanks, that worked, appreciate it.
Go to Top of Page
   

- Advertisement -