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

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
主站蜘蛛池模板: 福鼎市| 林州市| 武威市| 克什克腾旗| 盐城市| 宜川县| 普兰县| 农安县| 阿合奇县| 铜川市| 临湘市| 阿城市| 都安| 连山| 射洪县| 大冶市| 荃湾区| 象州县| 项城市| 长治县| 广灵县| 贡觉县| 灯塔市| 武平县| 全州县| 乌兰浩特市| 奎屯市| 洪洞县| 揭阳市| 邵阳市| 铜陵市| 长治县| 陆良县| 中宁县| 平南县| 凤阳县| 榆中县| 贵南县| 长海县| 寻乌县| 资溪县|