Setting and changing minimum password length

The configurable password allows you to customize passwords to fit your needs such as using four-digit personal identification numbers (PINs) or anonymous logins with NULL passwords.

NoteAdaptive Server uses a default value of 6 for minimum password length. Sybase recommends that you use a value of 6 or more for this parameter.

The system security officer can specify:

The per-login or per-role value overrides the server-wide value. Setting minimum password length affects only new passwords created after setting the value.

StepsSetting minimum password length for a specific login

  1. To set the minimum password length for a specific login at creation, use create login.

This example creates the new login “joe” with the password “Djdiek3”, and sets the minimum password length for “joe” to 8:

create login joe Djdiek3 with password @minpwdlen min password length 8

See create login in Reference Manual: Commands.

StepsSetting minimum password length for a specific role

  1. To set the minimum password length for a specific role at creation, use create role.

This example creates the new role “intern_role” with the password “temp244” and sets minimum password length for “intern_role” to 0:

create role intern_role with passwd "temp244", min passwd length 0

The original password is seven characters, but the password can be changed to one of any length because minimum password length is set to 0.

See create role in Reference Manual: Commands.

StepsChanging minimum password length for a specific login

  1. Use alter login to set or change minimum password length for an existing login.

This example changes minimum password length for the login “joe” to 8 characters.

alter login joe modify min password length 8

See alter login in Reference Manual: Commands.

StepsChanging minimum password length for a specific role

  1. Use alter role to set or change minimum password length for an existing role.

This example sets the minimum length for “physician_role”, an existing role, to 5 characters:

alter role physician_role set min passwd length 5

This example overrides the minimum password length for all roles:

alter role "all overrides" set min passwd length -1

See alter role in Reference Manual: Commands.

StepsRemoving minimum password length for a specific login

  1. Use alter login to remove the minimum password length for an existing login.

This example removes any restriction to minimum password length for login joe:

alter login joe modify drop min password length

See alter login in Reference Manual: Commands.