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


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章