官术网_书友最值得收藏!

Expiring a user's password

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...

  1. Connect to the database as a user who has the alter user privilege:
    $ sqlplus / 
    
  2. 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. 

See also

  • Creating and using OS-authenticated users
主站蜘蛛池模板: 齐齐哈尔市| 寿阳县| 县级市| 渝中区| 通道| 句容市| 获嘉县| 宜阳县| 永丰县| 新兴县| 无为县| 铁岭县| 保亭| 连州市| 赤壁市| 德化县| 鞍山市| 涿州市| 文山县| 凯里市| 太康县| 嫩江县| 建平县| 千阳县| 普定县| 中牟县| 清苑县| 四会市| 隆昌县| 宝清县| 泽普县| 宁安市| 治县。| 留坝县| 伽师县| 兴和县| 洛宁县| 威信县| 柳林县| 全椒县| 云安县|