The expiration of user's password is a very easy task.
Getting ready
To complete this recipe, you'll need an existing (for example, OS-authenticated) user who has the alter user privilege (you may use user who has a DBA role) and another existing user (for example, mike).
How to do it...
Connect to the database as a user who has the alter user privilege:
$ sqlplus /
Mike's password expires with the following command:
SQL> alter user mike password expire;
How it works...
In step 1, you used OS authentication to connect to the database.
In step 2, you expired password for the user mike. This means that the password is no longer valid and user mike must change his password after the next login:
SQL> alter user mike password expire; User altered. SQL> conn mike/welcome1 ERROR: ORA-28001: the password has expired Changing password for mike New password: Retype new password: Password changed Connected.