linux 用户异常shell-》ksh

# su - oracle
su: /usr/bin/ksh: No such file or directory


根据报错信息:显示无法找到文件 /usr/bin/ksh
果然没有该文件,但是发现存在文件/bin/ksh,
于是创建了一个软连接,可以规避问题,可以成功切换到用户下,但无法执行系统自带命令。
$. .bash_profile
-ksh: .: .bash_profile: cannot open [No such file or directory]

为什么用户的shell一直是ksh而不是bash
因为 linux环境中默认的shell是bash而不是ksh。
所以 去修改用户默认shell为bash

vi /etc/passwd
将 		oracle:x:501:1157::/home/oracle:/usr/bin/ksh 
替换为 	oracle:x:501:1157::/home/oracle:/bin/bash


猜你喜欢

转载自blog.51cto.com/10579005/2346162