본문 바로가기

OS&TOOL/리눅스

[우분투] 현재 쉘 확인 및 변경하는 법

쉘 확인하는 명령어

 

echo $SHELL

 

 

쉘 변경하는 명령어

 

쉘 변경을 위해 chsh 명령어 실행 중 오류발생

 

$ chsh

Password:

chsh: PAM: Authentication failure 

 

chsh

 

 

chsh: PAM: Authentication failure 오류 발생 원인

/etc/pam.d/chsh 파일 내용 중 아래 정책으로 인해 변경이 허용되지 않음.

auth      required   pam_shells.so  <---- /etc/shells 목록에 포함되어 있지 않으면 쉘 변경을 허용하지 않음.

 

vi /etc/pam.d/chsh

 

 

chsh: PAM: Authentication failure 오류 해결방법

 /etc/pam.d/chsh 의 파일에 

auth      required   pam_shells.so  내용을 주석

 

또는

 

required -> sufficient 변경하면 될듯 함.

 

또는

 

아래의 /etc/shells 에 현재 계정의 쉘이 존재하는지 확인

 

 

You may not change the shell for 'oracle'. 오류 해결방법

 

/etc/shells 에 현재 계정의 쉘을 추가

vi /etc/shells