Tuesday, July 03, 2007

Change Password for a Sybase User

Changing passwords for a Sybase user is a fairly straightforward process. The first example deals with changing the “sa” password (privilege user) or another user's password. The second example is when a user changes their password. Here is the syntax.

Note: If your password string begins with a number, enclose it in "quotes."

# isql -Usa -Ppassword
1> sp_password old_password, new_password, sa
2> go

Changing another user's password

# isql -Usa -Ppassword
1> sp_password old_password, new_password, esofthub
2> go

Any user can change their own password

# isql -Uesofthub -Pesofthub_password
1> sp_password old password, new_password
2> go


Splash! said...

Your blog is excellent!

Please, send me the photo of your keyring and the link of your blog,
I'll publish in my blog!
Thank you
My email: nicekeyrings@gmail.com

Brian said...

Also remember if you have certain special characters in your password you will need to use quotes to wrap it.


sp_password old_password,"NewP^ssw.0rd"

esofthub said...

Thanks for the tip Brian.

Scott said...

If you are the sa then the format is:

sp_password sa_password new_password username


kutti said...

Is there any way to find the object sp_password in sybase is used for own password reset or processed a password reset request from any user?