Password expiration
You can specify the number of days that a database user account password is valid as a system-wide setting. You can also specify the password expiration rate on a per-user and per-group basis. You can also expire an account password immediately.
SYSTEM.ADMIN(ADMIN)=> SET SYSTEM DEFAULT PASSWORDEXPIRY TO days;
SET VARIABLEThe days value specifies the number of days that the password is valid, since the last date when the password changed. If you do not want passwords to expire, specify a value of 0. The default system setting is 0.
You can specify the account password expiration by using the PASSWORDEXPIRY option of the [CREATE|ALTER] USER and [CREATE|ALTER] GROUP SQL commands. Some example commands follow.
- To create a group that has a password expiration rate of 45 days:
MYDB.SCH1(USER)=> CREATE GROUP staff WITH PASSWORDEXPIRY 45; - To change the expiration setting for the user sales_user to 30
days:
MYDB.SCH1(USER)=> ALTER USER sales_user WITH PASSWORDEXPIRY 30;
SYSTEM.ADMIN(myuser)=> ALTER USER myuseracct WITH PASSWORD 'newPassword';
ALTER USERSYSTEM.ADMIN(ADMIN)=> ALTER USER myuseracct EXPIRE PASSWORD;
ALTER USERIf the user is connected to a database, the expiration does not affect the current session. The next time that the user connects to a database, the user has a restricted-access session and must change the password by using the ALTER USER command.