sp_passthru  sp_placeobject

Chapter 1: System Procedures

sp_password

Description

Adds or changes a password for an Adaptive Server login account.

Syntax

sp_password caller_passwd, new_passwd [, loginame, immediate]

Parameters

caller_passwd

is your password. When you are changing your own password, this is your old password. When a System Security Officer is using sp_password to change another user’s password, caller_passwd is the System Security Officer’s password.

new_passwd

is the new password for the user, or for loginame. Configure the minimum password length with sp_configure minimum password length. The default is 6 bytes. Enclose passwords that include characters besides A-Z, a-z, or 0-9 in quotation marks. Also enclose passwords that begin with 0-9 in quotes.

loginame

the login name of the user whose account password is being changed by the System Security Officer.

immediate

specifies whether a password immediately takes effect on users who are logged in. The values are:

Examples

Example 1

Changes your password from “3blindmice” to “2mediumhot”. (Enclose the passwords in quotes because they begin with numerals.):

sp_password "3blindmice", "2mediumhot"

Example 2

A System Security Officer whose password is “2tomato” has changed Victoria’s password to “sesame1”:

sp_password "2tomato", sesame1, victoria

Example 3

Changes your password from NULL to “16tons.” Notice that NULL is not enclosed in quotes (NULL is not a permissible new password):

sp_password null, "16tons"

Example 4

PRODUCTION...sp_password figaro, lilacs

Changes your password on the PRODUCTION server from “figaro” to “lilacs.”

Usage

Permissions

Only a System Security Officer can execute sp_password to change another user’s password. Any user can execute sp_password to change his or her own password.

Auditing

Values in event and extrainfo columns from the sysaudits table are:

Event

Audit option

Command or access audited

Information in extrainfo

38

exec_procedure

Execution of a procedure

  • Roles – Current active roles

  • Keywords or options – NULL

  • Previous value – NULL

  • Current value – NULL

  • Other information – All input parameters

  • Proxy information – Original login name, if set proxy in effect

See also

System procedures sp_addlogin, sp_adduser





Copyright © 2005. Sybase Inc. All rights reserved. sp_placeobject

View this book as PDF