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

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
主站蜘蛛池模板: 弥渡县| 盐城市| 乐平市| 湖口县| 福海县| 衡阳县| 河间市| 武陟县| 洪洞县| 沐川县| 耿马| 聊城市| 延边| 台前县| 綦江县| 察雅县| 长海县| 高安市| 日喀则市| 巴彦县| 江陵县| 高密市| 桓台县| 长乐市| 罗田县| 肥东县| 应用必备| 宣城市| 汝南县| 高邑县| 东城区| 沾益县| 大邑县| 兰考县| 武宁县| 石嘴山市| 新平| 吴旗县| 阳新县| 武川县| 安塞县|