remote_os_autent实验

[root@ly003 ~]# su - oracle
[oracle@ly003 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 27 08:49:27 2018

Copyright (c) 1982, 2013, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>
SQL> show parameter os_au;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix string ops$
remote_os_authent boolean FALSE

SQL> create user ops$xinba identified by oracle;

User created.
SQL> grant resource ,connect to ops$xinba;

Grant succeeded.

SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@ly003 ~]$ su -
Password: 
[root@ly003 ~]# useradd -g oinstall -G dba xinba
[root@ly003 ~]# passwd xinba
Changing password for user xinba.
New password: 
BAD PASSWORD: it is based on a dictionary word
BAD PASSWORD: is too simple
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@ly003 ~]# su - xinba 
[xinba@ly003 ~]$ sqlplus /
-bash: sqlplus: command not found
[xinba@ly003 ~]$ exit
logout
[root@ly003 ~]# scp /home/oracle/.bash_profile /home/xinba/
[root@ly003 ~]# cd /home/xinba/
[root@ly003 xinba]# ll
total 0
[root@ly003 xinba]# ls -la
total 32
drwx------ 4 xinba oinstall 4096 Jun 27 09:08 .
drwxr-xr-x. 6 root root 4096 Jun 27 09:07 ..
-rw------- 1 xinba oinstall 15 Jun 27 09:08 .bash_history
-rw-r--r-- 1 xinba oinstall 18 May 10 2016 .bash_logout
-rw-r--r-- 1 xinba oinstall 772 Jun 27 09:09 .bash_profile
-rw-r--r-- 1 xinba oinstall 124 May 10 2016 .bashrc
drwxr-xr-x 2 xinba oinstall 4096 Nov 11 2010 .gnome2
drwxr-xr-x 4 xinba oinstall 4096 May 28 22:13 .mozilla
[root@ly003 xinba]# su - xinba
[xinba@ly003 ~]$ sqlplus /

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 27 09:09:44 2018

Copyright (c) 1982, 2013, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[xinba@ly003 ~]$ lsnrctl status

LSNRCTL for Linux: Version 11.2.0.4.0 - Production on 27-JUN-2018 09:10:08

Copyright (c) 1991, 2013, Oracle. All rights reserved.

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ly003)(PORT=1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error
TNS-00511: No listener
Linux Error: 111: Connection refused
[xinba@ly003 ~]$ sqlplus /@oracle01:1521/VDEDU

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 27 09:10:43 2018

Copyright (c) 1982, 2013, Oracle. All rights reserved.

ERROR:
ORA-12154: TNS:could not resolve the connect identifier specified


Enter user-name: 
ERROR:
ORA-01017: invalid username/password; logon denied
[xinba@ly003 ~]$ su - oracle
Password: 
su: incorrect password
[xinba@ly003 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 27 09:11:21 2018

Copyright (c) 1982, 2013, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> show parameter os_au;

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
os_authent_prefix string ops$
remote_os_authent boolean FALSE
SQL> alter system set remote_os_authent=true scope=spfile;

System altered.
SQL> shutdown immediate
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup
ORA-32004: obsolete or deprecated parameter(s) specified for RDBMS instance
ORACLE instance started.

Total System Global Area 1603411968 bytes
Fixed Size 2253664 bytes
Variable Size 989858976 bytes
Database Buffers 603979776 bytes
Redo Buffers 7319552 bytes
Database mounted.
Database opened.
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[xinba@ly003 ~]$ su - xinba
Password: 
[xinba@ly003 ~]$ sqlplus / @ly003:1521/VDEDU_ONE

SQL*Plus: Release 11.2.0.4.0 Production on Wed Jun 27 09:35:56 2018

Copyright (c) 1982, 2013, Oracle. All rights reserved.


Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SP2-0310: unable to open file "ly003:1521/VDEDU_ONE.sql"
SQL>

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值