linux 下 su - oracle 切换不了
之前在华为云上买了一台虚拟机,在上面搭建好了oracle数据库,但是一直没用,今天突然想起来用一下,登上去发现一个诡异的现象,su - oracle切换不进去[root@18c ~]# pwd/root[root@18c ~]# ps -ef |grep pmonoracle1134210 Oct19 ?00:01:38 ora_pmon_cdb1...
·
之前在华为云上买了一台虚拟机,在上面搭建好了oracle数据库,但是一直没用,今天突然想起来用一下,登上去发现一个诡异的现象,su - oracle切换不进去
[root@18c ~]# pwd
/root
[root@18c ~]# ps -ef |grep pmon
oracle 11342 1 0 Oct19 ? 00:01:38 ora_pmon_cdb1
root 12679 12528 0 16:15 pts/0 00:00:00 grep pmon
[root@18c ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda2 36G 17G 17G 51% /
tmpfs 1.9G 1.1G 892M 54% /dev/shm
/dev/vdb1 30G 8.4G 20G 30% /data
[root@18c ~]# su - oracle
[root@18c ~]# pwd
/root
[root@18c ~]#
查看secure log,如下
[root@18c ~]# tail -f /var/log/secure|grep su
Nov 16 16:11:14 18c su: pam_unix(su-l:session): session opened for user oracle by root(uid=0)
Nov 16 16:11:14 18c su: pam_unix(su-l:session): session closed for user oracle
Nov 16 16:12:22 18c su: pam_unix(su-l:session): session opened for user oracle by root(uid=0)
Nov 16 16:12:22 18c su: pam_unix(su-l:session): session closed for user oracle
Nov 16 16:12:30 18c su: pam_unix(su:session): session opened for user oracle by root(uid=0)
Nov 16 16:12:30 18c su: pam_unix(su:session): session closed for user oracle
Nov 16 16:12:45 18c su: pam_unix(su-l:session): session opened for user oracle by root(uid=0)
Nov 16 16:12:45 18c su: pam_unix(su-l:session): session closed for user oracle
Nov 16 16:15:44 18c su: pam_unix(su-l:session): session opened for user oracle by root(uid=0)
Nov 16 16:15:44 18c su: pam_unix(su-l:session): session closed for user oracle
网上找了一番,没发现啥问题,这时候群里人给出了意见,是否nproc满了,可是oralce已经设置了
[root@18c ~]# vi /etc/security/limits.conf
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
oracle soft stack 10240
oracle hard stack 32768
oracle hard memlock 134217728
oracle soft memlock 134217728
这个也排除掉了,问了很多人,给了不同的尝试建议,都无解,最终重启机器,还是他奶奶的无解。。。。
于是删除oracle用户,再重新创建
[root@18c ~]# userdel oracle
userdel: user oracle is currently used by process 2447
[root@18c ~]# kill -9 2447
[root@18c ~]# userdel -r oracle
[root@18c ~]# useradd -u 54321 -g oinstall -G dba,oper oracle
[root@18c ~]# su - oracle
[oracle@18c ~]$ pwd
最终是通过重建用户,才解决问题,不到具体的原因还是一脸们比,如果有哪位大牛知道原因,还请不吝赐教!!!!!
更多推荐
已为社区贡献4条内容
所有评论(0)