a profile has dual function: toenforce a password policy and to restrict the resources a session can consume;
密码管理是一直有效的
对资源的管理时当初始化参数resource_limit为true时才会有效,默认值为false;
密码管理
failed_login_attempts:在账号被锁之前可以输入错误密码的最大次数; passwork _lock_time:账号在上步被锁定后,,需要锁定是时间 password_life_time:账号需要在多长时间内需要进行修改,还和password_grace_time参数有关 password_grace_time:指定宽限天数,数据库发出警告到登陆失效前的天数。如果数据库密码在这中间没有被修改,则过期会失效。
password_reuse_max:这个参数和下面一个参数需要同时使用才有作用,需要做试验进行测试; password_reuse_time password_verify_function资源管理
sessions_per_user cpu_per_session cpu_per_call logical_reads_per_session logical_reads_per_call private_sga connect_time idle_time composite_limit建立和分派配置文件
--查看目前正在使用的配置文件
selectusername,profile from dba_users;
默认的配置文件对资源没有任何限制,指示对密码有限制
failed_login_attempts
10
password_lock_time
1
password_life_time
180
password_grace_time
7
在%oracle_homerdbms\admin\utlpwdmg.sql%文件中有更加详细的配置文件的建立方法;
一个配置文件一旦被分派给用户,这个配置文件就不能被删除
drop profile profile_name;
dropprofile profile_name cascade;--这个命令可以删除配置文件,并恢复为默认的default配置文件;
例:
createprofile two_wrong limit failed_login_attempts 2;
alteruser sj profile two_wrong;
数据库安全准则:
有安全危险的包:
utl_file:允许用户去读写操作系统中oracle用户可以读写的所有文件和目录; utl_tcp:允许用户打开服务器上的tcp端口 utl_smtp: utl_http:和oracle安全相关的初始化参数
utl_file_dir:这个参数默认值为null,这时不存在安全问题,但如果设定值后,通过utl_file包就可以访问相关的目录和文件了; remote_os_authent and os_authent_prefix 07_dictionary_accessibility:this instance parameter controls the effect of granting object privileges with the any keyword;如果将这个参数设置为true,那么用户将可以看到数据字典和用户数据;变通的方法是使用select any dictionary权限,这个权限可以让用户看到数据字典和动态性能视图,但是他们不能看到用户的数据; remote_login_passwordfile:这个参数控制sysdba和sysoper用户是否可以通过网络远程登录;如果这个参数设置为none,那么sysdba唯一登录oracle数据库的方法就是登录oracle所在的服务器操作系统; shared:所有的运行的实例使用一个密码文件 exclusive:每个实例都寻找自己相对应的密码文件; 如果你用sysdba权限登录,不管你输入的是哪个用户名,最终显示的用户为sys;
如果你用sysoper权限登录,不管你输入的是哪个用户名,最终显示的用户为public;
