Oracle User Management - User Passwords

Use profile to manage user passwords
Profile is a set of commands for password restrictions and resource restrictions. When creating a database, oracle will automatically create a profile named default. When creating a user without specifying the proflie option, oracle will assign default to user

1. Account lock (use level: dba)
Overview: Specify the maximum number of times the account (user) can enter the password when logging in, and also specify the user lock time (days). Generally, the command is executed as a dba
// Example: specify tea This user can only try to log in at most 3 times, and the lock time is 2 days

//2 represents how many 2 days
sql>create profile lock_account limit failed_login_attempts 3 password_lock_time 2;
sql>alter user tea profile lock_account;

2. Unlock the account (user) (Use level: dba)
//Example:
//Username:xiaoming
//conn /as sysdba
sql>alter user xiaoming account unlock;

3. Terminate password (use level: dba)
Function: In order to allow users to change their passwords regularly, use The command to terminate the password is completed. The same command also requires the dba identity to operate.
Example: Create a profile file for the previously created user tea, and require the user to modify his login password every 10 days, with a grace period of 2 days.
sql>create profile myprofile limit password_life_time 10 password_grace_time 2;
sql>alter user tea profile myprofile


password history (password history is to add password_reuse_time XXX after the termination password)
Overview: If you want users to change their passwords, they cannot use previously used passwords , you can use the password history, so that oracle will store the password modification information in the data dictionary, so when the user changes the password, oracle will compare the old and new passwords, and when it finds that the old and new passwords are the same, it will prompt the user to re-enter the password .
Example:
1) Create profile
sql>create profile password_history limit password_life_time 10 password_grace_time 2 password_reuse_time 10;
password_reuse_time //Specify the reusable time of the password, that is, it can be reused after 10 days
2) Assign a user to


delete profile
overview: when a profile is not needed file, you can delete the file
sql>drop profile password_history cascade;

note:
1.cascade represents cascade, the assigned profile, must add the cascade option when deleting
2. must have create profile permission to create a profile
3.default is Default profile, cannot be deleted

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327032937&siteId=291194637