ssh登录oracle用户时提示这个问题
Last login: Mon Nov 21 04:38:30 2016 from 192.168.48.12
-bash-4.1$
怀疑是删除了oracle home目录下的文件:
[oracle@centos6 ~]$ ls -a
. c.sql .gnupg Pictures
.. ctl .gstreamer-0.10 Public
20161115.txt .dbus .gtk-bookmarks .pulse
.abrt Desktop .gvfs .pulse-cookie
awr dmp .ICEauthority scripts
backup Documents .imsettings.log .ssh
Downloads .local Templates
.esd_auth log.bbd Videos
filelist.txt .mozilla .viminfo
.bashrc .gconf Music .Xauthority
.cache .gconfd .nautilus .xsession-errors
.config .gnome2 .oracle .zshrc
create.sql .gnote par.txt
对比一个正常的环境
[oracle@cismdb4 ~]$ ls -a
. .bash_logout .bashrc shandong .Xauthority
.. .bash_profile oradiag_oracle .viminfo
初步推测是少了.bash_logout,.bash_profile,.bashrc这三个文件
因为在linux下通过useradd方式创建新用户时,都会将所有的配置文件从/etc/skel复制到/home目录的新用户录下。那么就复制/etc/skel这个目录的文件到oracle中
[root@centos6 ~]# cd /etc/skel/
[root@centos6 skel]# ls -a
. .. .bash_logout .bash_profile .bashrc .gnome2 .mozilla .zshrc
拷贝过去即可
[root@centos6 skel]# cp .bash_logout /home/oracle/
[root@centos6 skel]# cp .bash_profile /home/oracle/
[root@centos6 skel]# cp .bashrc /home/oracle/
这样就可以正常登录了