태그 보관물: zsh

zsh

오류 비밀번호 : chsh : PAM : Oh my zsh를 설치하려고 할 때 인증 실패 로그입니다 sudo curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh |

오 내 zsh를 설치하려고합니다. zsh 설치 후 ( sudo apt-get update && sudo apt-get install -y zsh)

그런 다음 설치

sudo apt-get install -y curl  

그런 다음 git을 설치하십시오.

이 명령을 시도하면 문제가 발생합니다.

curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | bash

이것은 로그입니다

sudo curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   146  100   146    0     0     91      0  0:00:01  0:00:01 --:--:--    91
100  1779  100  1779    0     0    525      0  0:00:03  0:00:03 --:--:--  1416
\033[0;34mCloning Oh My Zsh...\033[0m
Cloning into '/home/icom3/.oh-my-zsh'...
remote: Reusing existing pack: 10101, done.
remote: Total 10101 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (10101/10101), 1.92 MiB | 172.00 KiB/s, done.
Resolving deltas: 100% (5337/5337), done.
Checking connectivity... done.
\033[0;34mLooking for an existing zsh config...\033[0m
\033[0;33mFound ~/.zshrc.\033[0m \033[0;32mBacking up to ~/.zshrc.pre-oh-my-zsh\033[0m
\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m
\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m
\033[0;34mTime to change your default shell to zsh!\033[0m
Password: chsh: PAM: Authentication failure

어떤 아이디어가 있습니까?

내가 시도했음을 참고하십시오.

sudo vim /etc/pam.d/chsh  

그런 다음 auth required pam_shells.so를 주석 처리하십시오. 그러나 여전히 오류가 발생합니다.



답변

스크립트를 별도로 다운로드하여 실행하십시오.

curl -OL https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh
bash install.sh

변경 사항을 취소해야 할 수도 /etc/pam.d/chsh있습니다.

설명:

스크립트의 텍스트를 bash

cat script.sh | bash

스크립트를 매개 변수로 제공하는 것과 다릅니다 bash

bash script.sh

에 bash 를 연결 install.sh하면 bashbash는 표준 입력 ( stdin )을 사용자가 아닌 파이프에서 가져옵니다. 이 경우 stdinchsh 으로부터 입력을받는 것 같습니다. stdin 은 호출 후 스크립트의 다음 줄입니다 chsh. (현재 빈 줄 인 것 같습니다. 비밀번호 인 경우 아무런 문제가 없습니다. ;-))

read한 줄의 입력 이 필요한이 짧은 스크립트를 사용하여이를 테스트 할 수 있습니다 .

read -p 'input: ' INPUT
echo -n 'You wrote this: '
echo "> $INPUT <"

로 저장 script.sh:

$ bash script.sh
input: foobar
You wrote this: > foobar <
$ cat script.sh | bash
> echo -n 'You wrote this: ' <


답변