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

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
主站蜘蛛池模板: 新野县| 深水埗区| 东乌珠穆沁旗| 内江市| 满城县| 天水市| 金沙县| 开化县| 安仁县| 佳木斯市| 云林县| 德化县| 乌苏市| 宜都市| 耿马| 文水县| 平和县| 独山县| 库尔勒市| 赞皇县| 榆社县| 娱乐| 鞍山市| 鄂托克旗| 峨边| 韩城市| 张家界市| 张家口市| 邮箱| 科技| 焦作市| 宁国市| 定州市| 阿拉善右旗| 新乐市| 涡阳县| 晋宁县| 砀山县| 宜兰市| 芜湖市| 新化县|