ORACLE体系结构--密码文件管理

本文介绍了Oracle数据库中密码文件的作用及配置方法,包括如何通过不同参数设置操作系统认证与密码文件认证,创建密码文件的过程,以及如何查看和管理密码文件中的用户信息。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.密码文件的作用



具有 sysdba/sysoper权限 远程登录时,需要用到密码文件

sqlplus / as sysdba //操作系统认证,用户密码即使不正确也可以登录,不安全

操作系统认证(只要可以登录这个操作系统,我就不管你的用户名和密码)
sqlnet.ora
sqlnet.authentication_services=(all|none)
none:关闭操作系统认证,使用密码文件认证
all:使用操作系统认证,关闭本机密码文件认证


关闭操作系统认证:

#cd  /u01/oracle/11g/network/admin/samples
#vim sqlnet.ora
      sqlnet.authentication_services=(none)

 密码文件认证:
remote_login_passwordfile

SQL> show parameter remote

NAME      TYPE  VALUE
------------------------------------ ----------- ------------------------------
remote_dependencies_mode      string  TIMESTAMP
remote_listener       string
remote_login_passwordfile      string  EXCLUSIVE  //该文件存放密码
remote_os_authent      boolean  FALSE
remote_os_roles       boolean  FALSE
result_cache_remote_expiration      integer  0
SQL>


none:关闭密码文件认证,使用操作系统认证
exclive:使用独占的密码文件认证
shared:多个实例共享同一个密码文件 ---一般使用到集权环境中,不能用alter user 修改密码会出现问题

修改有sysdba 权限的用户密码都不能修改成功

关闭密码文件认证:

>>>alter system set remote_login_passwordfile=none scope=spfile;


sqlnet.authenication_services=(none) //多种组合
remote_login_passwordfile=none
 

2.创建密码文件



oracle$> orapwd //创建密码文件
 

[oracle@up12 ~]$ orapwd
Usage: orapwd file=<fname> entries=<users> force=<y/n> ignorecase=<y/n> nosysdba=<y/n>

  where
    file - name of password file (required),
    password - password for SYS will be prompted if not specified at command line,
    entries - maximum number of distinct DBA (optional),
    force - whether to overwrite existing file (optional),
    ignorecase - passwords are case-insensitive (optional),
    nosysdba - whether to shut out the SYSDBA logon (optional Database Vault only).
    
  There must be no spaces around the equal-to (=) character.




cd /u01/oracle/11g/dbs
orapwdORACLE_SID //linux系统中
pwdORACLE_SID //windows系统中

$ORACLE_HOME/dbs/orapeORACLE_SID
orapwd file=文件名 password=密码 entries=5(可以放的用户,一般不跟他,跟块的大小有关)
 

3.查看密码文件


select * from v$pwfile_users //查看密码文件

SQL> select * from v$pwfile_users;

USERNAME        SYSDB SYSOP SYSAS                     //存放具有这三种权限的用户
------------------------------ ----- ----- -----
SYS        TRUE  TRUE  FALSE




4.密码文件的限制
限制用户的远程登录
orapwORACLE_SID

5.密码文件丢失处理
只影响远程登录,不影响数据库运行

转载于:https://my.oschina.net/liubaizi/blog/801566

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值