oracle审计相关:audit日志和安全策略

作者:51ak

开启审计日志

1.查询当前审计日志开启状态

show parameter audit;

 show parameter audit;
 
NAME                     TYPE    VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest              string  /app/oracle/******/adum
                         p
audit_sys_operations             boolean     TRUE
audit_syslog_level           string
audit_trail              string  DB

2.开启审计日志

alter system set audit_sys_operations=TRUE scope=spfile;

需重启

3.关闭审计功能

conn /as sysdba
show parameter audit
alter system set audit_trail = none scope=spfile;

密码策略

1.创建profile

create profile DEFAULTE limit
sessions_per_user unlimited
cpu_per_session unlimited
cpu_per_call unlimited
connect_time unlimited
;

这里分两类:

(1) 对数据库资源做限制

(2) 对密码做限制

2.修改新profile

SELECT resource_type,resource_name,limit FROM dba_profiles WHERE resource_type='PASSWORD' AND profile='DEFAULTE';

alter profile DEFAULTE limit
FAILED_LOGIN_ATTEMPTS 5
PASSWORD_LIFE_TIME UNLIMITED
PASSWORD_REUSE_TIME UNLIMITED
PASSWORD_REUSE_MAX UNLIMITED
PASSWORD_VERIFY_FUNCTION VERIFY_FUNCTION_11G
PASSWORD_LOCK_TIME 1
PASSWORD_GRACE_TIME 7;

3. 修改用户对应的profile

select username,profile from dba_users ;


alter user SYSTEM  profile DEFAULTE;
alter user SYS  profile DEFAULTE;
alter user ...  profile DEFAULTE;

4.修改旧profile

alter profile DEFAULT limit
FAILED_LOGIN_ATTEMPTS 5
PASSWORD_LIFE_TIME 90
PASSWORD_REUSE_TIME 5
PASSWORD_REUSE_MAX 3
PASSWORD_VERIFY_FUNCTION VERIFY_FUNCTION_11G
PASSWORD_LOCK_TIME 1
PASSWORD_GRACE_TIME 7;

5.删除profile

如果需要回滚,所有用户用default的话


alter user SYSTEM  profile DEFAULT;
alter user SYS  profile DEFAULT;
alter user ...  profile DEFAULT;


drop profile DEFAULTE cascade;

发布日期:2017/11/19

Categories: oracle 数据库管理 规范 Tags: 原创