We can modify properties of Sybase Login using sp_modifylogin stored procedure. To change properties of login, SSO(OPER_ROLE) permissions required. It modifies the following properties of login:
default database
default language
default role activation
login script
full name
password expiration interval
minimum password length
maximum number of failed logins
Syntax to modify Sybase Login properties:
sp_modifylogin {loginame | “all overrides”}, option, value
Examples:
1. Check the properties of login by running sp_displaylogin command.
sp_displaylogin george
go
For the login ‘george’ as shown above, doesnt configured Default Language, Auto Login Script and Password expiration interval, Password expired are configured as never. In the following examples, we are going to modify login properties
1. Change default database from master to r2schools.
sp_modifylogin george,defdb,'r2schools' go
2. Change full name of login in Sybase
sp_modifylogin george, fullname, "Michael George" go
3. Change maximum number of failed login attempts for the login “george” to 9. If number failed attempts reaches to maximum, then login will be locked.
sp_modifylogin george, "max failed_logins", "9" go
4. To remove failed login attempts, give “0” option. ‘0’(zero) means unlimited login attempts.
sp_modifylogin george, "max failed_logins", "0" go
5. Change password expiration in Sybase. By default, password expiration never expires.
sp_modifylogin george,"passwd expiration","90" go
If we want to set password expiration to never. run following command
sp_modifylogin george,”passwd expiration”,”0″
To verify the changes effected or not by running stored procedure sp_displaylogin.