Oracle 8 Database Administration volume 2 instruction guide phần 7 ppt

34 308 0
Oracle 8 Database Administration volume 2 instruction guide phần 7 ppt

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Oracle8: Database Administration 18-21 . Administering Passwords Similar to the resource limit settings, create the profile to limit the password settings, and assign them to the user by using the CREATE or ALTER USER command. However password limit settings in profiles are always enforced, all other limits such as SESSIONS_PER_USER are enforced only when resource limits are enabled by the initialization parameter or the ALTER SYSTEM command. When password management is enabled, the user account can be locked or unlocked by using the CREATE USER or ALTER USER command. 18-14 Copyright  Oracle Corporation, 1998. All rights reserved. Enabling Password Management • Set up password management by using profiles and assigning them to users. • Lock, unlock, and expire accounts using the CREATE USER or ALTER USER command. • Password limits are always enforced, even if RESOURCE_LIMIT for an instance is set to FALSE. 18-22 Oracle8: Database Administration . Lesson 18: Managing Profiles Use the following CREATE PROFILE command to administer passwords: CREATE PROFILE profile LIMIT [FAILED_LOGIN_ATTEMPTS max_value] [PASSWORD_LIFE_TIME max_value] [ {PASSWORD_REUSE_TIME |PASSWORD_REUSE_MAX} max_value] [ACCOUNT_LOCK_TIME max_value] [PASSWORD_GRACE_TIME max_value] [PASSWORD_VERIFY_FUNCTION {function|NULL| DEFAULT} ] OEM 1 Use Security Manager. 2 Choose Profile—>Create. 3 In the Password Property sheet enter the account password parameters. 4 Click Apply. 18-15 Copyright  Oracle Corporation, 1998. All rights reserved. Creating a Profile: Password Settings CREATE PROFILE grace_5 LIMIT FAILED_LOGIN_ATTEMPTS 3 PASSWORD_LIFE_TIME 30 PASSWORD_REUSE_TIME 30 PASSWORD_VERIFY_FUNCTION verify_function PASSWORD_GRACE_TIME 5; Oracle8: Database Administration 18-23 . Administering Passwords 18-16 Copyright  Oracle Corporation, 1998. All rights reserved. Password Settings Parameter FAILED_LOGIN_ATTEMPTS PASSWORD_LOCK_TIME PASSWORD_LIFE_TIME PASSWORD_GRACE_TIME Description Number of failed login attempts before lockout of the account Number of days for which the account remains locked upon password expiration Lifetime of the password in days after which the password expires Grace period in days for changing the password after the first successful login after the password has expired 18-17 Copyright  Oracle Corporation, 1998. All rights reserved. Password Settings Parameter PASSWORD_REUSE_TIME PASSWORD_REUSE_MAX PASSWORD_VERIFY_FUNCTION Description Number of days before a password can be reused Maximum number of times a password can be reused PL/SQL function that makes a password complexity check before a password is assigned 18-24 Oracle8: Database Administration . Lesson 18: Managing Profiles Account Locking Oracle server automatically locks an account after the FAILED_LOGIN_ATTEMPTS value is reached. The account is either automatically unlocked after a specified time (PASSWORD_LOCK_TIME) or it must be unlocked by the database administrator using the ALTER USER command. The database account can also be explicitly locked with the ALTER USER command. When this happens, the account is not automatically unlocked. Password Aging and Expiration The PASSWORD_LIFE_TIME parameter sets the maximum lifetime after which the password must be changed. The database administrator can specify a grace period (PASSWORD_GRACE_TIME), which begins after the first attempt to log in to the database after password expiration. A warning message is generated every time the user tries to log in until the grace period is over. The user is expected to change the password within the grace period. If the password is not changed, the account is locked. The user’s account status is changed to EXPIRED by explicitly setting the password to be expired. That is, when the user logs in, the account enters the grace period. For example, this is useful when a new account is created. Password History Password history checks ensure that a user cannot reuse a password for a specified time interval. These checks can be implemented using one of the following: • PASSWORD_REUSE_TIME to specify that a user cannot reuse a password for a given number of days • PASSWORD_REUSE_MAX to force user to define a password that is not identical to earlier passwords When one parameter is set to a value other than DEFAULT or UNLIMITED, the other parameter must be set to UNLIMITED. Oracle8: Database Administration 18-25 . Administering Passwords When a new password verification function is added, the database administrator must consider the following restrictions: • The procedure must use the specification indicated in the slide. • The procedure returns the value TRUE for success and FALSE for failure. • If the password function raises an exception, an error is returned and the ALTER USER or CREATE USER command is terminated. • The password function is owned by SYS. • If the password function becomes invalid, an error message is returned and the ALTER USER or CREATE USER command is terminated. 18-18 Copyright  Oracle Corporation, 1998. All rights reserved. User-Provided Password Function Function must be created in the SYS schema and must have the following specification: function_name( userid_parameter IN VARCHAR2(30), password_parameter IN VARCHAR2(30), old_password_parameter IN VARCHAR2(30)) RETURN BOOLEAN 18-26 Oracle8: Database Administration . Lesson 18: Managing Profiles Oracle provides a complexity verification function, which is provided in the form of a default PL/SQL function called VERIFY_FUNCTION by the utlpwdmg.sql script, and which must be run in the SYS schema. During the execution of the utlpwdmg.sql script the Oracle server creates the VERIFY_FUNCTION and changes the DEFAULT profile with the following ALTER PROFILE command: ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME 60 PASSWORD_GRACE_TIME 10 PASSWORD_REUSE_TIME 1800 PASSWORD_REUSE_MAX UNLIMITED FAILED_LOGIN_ATTEMPTS 3 PASSWORD_LOCK_TIME 1/1440 PASSWORD_VERIFY_FUNCTION verify_function; Instructor Note Run the utlpwdmg.sql script. Show the password functionality, for example, by creating a user with the same username and password or by trying to connect three times with the wrong password. 18-19 Copyright  Oracle Corporation, 1998. All rights reserved. Password Verification Function VERIFY_FUNCTION • Minimum length is four characters • Password should not be equal to username • Password should have at least one alpha, one numeric, and one special character • Password should differ from the previous password by at least three letters Password verification Oracle8: Database Administration 18-27 . Viewing Password Information Viewing Password Information Use DBA_USERS to obtain information about expiration and locking dates and the account status. SVRMGR> SELECT username, password, account_status, 2>lock_date, expiry_date 3> FROM dba_users; USERNAME PASSWORD ACCOUNT_STATUS LOCK_DATE EXPIRY_DA SYS D4C5016086B2DC6 OPEN 19-DEC-97 SYSTEM D4DF7931AB130E3 OPEN 19-DEC-97 TEST 7A0F2B316C212D6 OPEN 31-JAN-98 SCOTT F894844C34402B6 OPEN 19-DEC-97 DBSNMP E066D214D5421CC OPEN 19-DEC-97 USER3 94152F9F5B35B10 OPEN 12-FEB-98 6 rows selected. 18-20 Copyright  Oracle Corporation, 1998. All rights reserved. Viewing Password Information • DBA_USERS – profile – username – account_status – lock_date – expiry_date • DBA_PROFILES – profile – resource_name – resource_type (PASSWORD) – limit 18-28 Oracle8: Database Administration . Lesson 18: Managing Profiles Query the DBA_PROFILE view to display password profile information: SVRMGR> SELECT * FROM dba_profiles 2>WHERE resource_type='PASSWORD'; PROFILE RESOURCE_NAME LIMIT DEFAULT FAILED_LOGIN_ATTEMPTS 3 DEVELOPER_PROF FAILED_LOGIN_ATTEMPTS DEFAULT DEFAULT PASSWORD_LIFE_TIME 60 DEVELOPER_PROF PASSWORD_LIFE_TIME DEFAULT DEFAULT PASSWORD_REUSE_TIME 1800 DEVELOPER_PROF PASSWORD_REUSE_IME DEFAULT DEFAULT PASSWORD_REUSE_MAX UNLIMITED DEVELOPER_PROF PASSWORD_REUSE_MAX DEFAULT DEFAULT PASSWORD_VERIFY_FUNCTION VERIFY_FUNCTION DEVELOPER_PROF PASSWORD_VERIFY_FUNCTION DEFAULT DEFAULT PASSWORD_LOCK_TIME .0006 DEVELOPER_PROF PASSWORD_LOCK_TIME DEFAULT DEFAULT PASSWORD_GRACE_TIME 10 DEVELOPER_PROF PASSWORD_GRACE_TIME DEFAULT 14 rows selected. Oracle8: Database Administration 18-29 . Summary Summary Quick Reference Context Reference Initialization parameters RESOURCE_LIMIT Dynamic performance views Data dictionary views DBA_PROFILES DBA_USERS Commands CREATE PROFILE ALTER PROFILE DROP PROFILE CREATE USER ALTER USER Stored procedures and functions VERIFY_FUNCTION 18-21 Copyright  Oracle Corporation, 1998. All rights reserved. Summary • Controlling resource usage • Administering passwords 18-30 Oracle8: Database Administration . Lesson 18: Managing Profiles [...]... Total 60 minutes 19 -2 Oracle8 : Database Administration Objectives Objectives Objectives • Identifying system and object privileges • Granting and revoking privileges • Controlling operating system or password file authentication 19 -2 Copyright © Oracle Corporation, 19 98 All rights reserved Oracle8 : Database Administration 19-3 Lesson 19: Managing... before a database startup Oracle8 : Database Administration 19-11 Lesson 19: Managing Privileges View the V$PWFILE_USERS to display users who have been granted SYSDBA or SYSOPER privileges SVRMGR> SELECT * FROM v$pwfile_users; USERNAME - SYSDB - SYSOP - INTERNAL TRUE TRUE SYS TRUE TRUE 2 rows selected 19- 12 Oracle8 : Database Administration. .. Category SYSOPER STARTUP SHUTDOWN ALTER DATABASE OPEN | MOUNT ALTER DATABASE BACKUP CONTROLFILE ALTER TABLESPACE BEGIN/END BACKUP RECOVER DATABASE, ALTER DATABASE ARCHIVELOG RESTRICTED SESSION SYSDBA 19 -7 Examples SYSOPER privileges WITH ADMIN OPTION CREATE DATABASE RECOVER DATABASE UNTIL Copyright © Oracle Corporation, 19 98 All rights reserved In the lesson “Managing Oracle Instance” the system privileges... Chapter 21 “Managing User Privileges” in Oracle Server Administrator’s Guide Release 8. 0, or query the SYSTEM_PRIVILEGE_MAP view Oracle8 : Database Administration 19 -7 Lesson 19: Managing Privileges Granting System Privileges Granting System Privileges GRANT CREATE SESSION, CREATE TABLE TO user1; GRANT CREATE SESSION TO scott WITH ADMIN OPTION; 19-6 Copyright © Oracle. .. Oracle8 : Database Administration 19- 17 Lesson 19: Managing Privileges Revoking System Privileges Using WITH ADMIN OPTION DBA USER 1 SCOTT DBA USER 1 SCOTT GRANT REVOKE 19- 12 Copyright © Oracle Corporation, 19 98 All rights reserved Revoking System Privileges Using WITH ADMIN OPTION RESULT DBA 19-13 USER 1 SCOTT Copyright © Oracle Corporation, 19 98 All rights reserved... Oracle8 : Database Administration 19-5 Lesson 19: Managing Privileges Note Users with ANY privileges can access dictionary tables except with prefix USER_ALL and any views on which privileges have been granted to PUBLIC Instructor Note Mention that there are roles such as SELECT_CATALOG_ROLE, which enable access to the data dictionary 19-6 Oracle8 : Database Administration. .. introduced to specify the authentication using password file Only database administrators should have the capability to connect to a database with administrator privileges Connecting as SYSDBA gives a user unrestricted privileges to perform any operation on a database or the objects within a database 19-10 Oracle8 : Database Administration Password File Authentication ... privileges to roles 19 -22 Oracle8 : Database Administration Displaying Object Privileges Displaying Object Privileges Displaying Object Privileges DBA_TAB_PRIVS DBA_COL_PRIVS GRANTEE OWNER TABLE_NAME COLUMN_NAME GRANTOR PRIVILEGE GRANTABLE GRANTEE OWNER TABLE_NAME GRANTOR PRIVILEGE GRANTABLE 19-16 Copyright © Oracle Corporation, 19 98 All rights reserved Query DBA_TAB_PRIVS... user or role in the database OEM 1 Use Oracle Security Manager 2 Select the username or role to which you want to grant the privilege 3 Select Privilege Type: System Privileges 4 Select the system privilege you want to grant 5 Optionally check the WITH ADMIN OPTION box 6 Click apply Note The Admin option will be discussed later in this chapter Oracle8 : Database Administration 19-9... SEQUENCE CREATE DATABASE LINK CREATE PROCEDURE CREATE TRIGGER CREATE TYPE 12 rows selected Note The DBA_SYS_PRIVS view shows all system privileges granted to roles and users at the database level, whereas SESSION_PRIVS shows the current privileges for the session, both from the privilege granted directly and from enabled roles (see “Managing Roles”) 19-14 Oracle8 : Database Administration . 19-DEC- 97 TEST 7A0F2B316C212D6 OPEN 31-JAN- 98 SCOTT F89 484 4C34402B6 OPEN 19-DEC- 97 DBSNMP E066D214D5 421 CC OPEN 19-DEC- 97 USER3 94152F9F5B35B10 OPEN 12- FEB- 98 6 rows selected. 18- 20 Copyright  Oracle Corporation,. VARCHAR2(30), password_parameter IN VARCHAR2(30), old_password_parameter IN VARCHAR2(30)) RETURN BOOLEAN 18- 26 Oracle8 : Database Administration . Lesson 18: Managing Profiles Oracle. and functions VERIFY_FUNCTION 18- 21 Copyright  Oracle Corporation, 19 98. All rights reserved. Summary • Controlling resource usage • Administering passwords 18- 30 Oracle8 : Database Administration . Lesson 18: Managing

Ngày đăng: 08/08/2014, 20:21

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan