visudo
구문 오류에 대해 경고했기 때문에 변경하지 않고 종료했습니다. 나는 그 안에 새 파일을 만들기로 결정했습니다 /etc/sudoers.d
. 불행하게도 나는 맨파일 개요에 충분히 주의를 기울이지 않았고 그것을 게시하지 않았습니다 sudo visudo -x /etc/sudoers.d/jupyter
(올바른 인수는 가 -f
아니어야 합니다 -x
). 새 파일을 만드는 대신 내 구성을 내보냈습니다. 최종 결과는 다음과 같습니다.더 이상 sudo가 필요하지 않습니다.
- 복구 모드로 재부팅하지 않고도 복구가 가능한가요?
- 이 방법나에게 적합하지 않음(노틸러스 사용)
- 또한
visudo
이것이 작동해야합니까? (비꼬는 것은 아니지만 의도된 목적은 사용자를 보호하는 것입니다. 그렇죠?) 데비안 맨페이지에는 최소한 입력 파일과 출력 파일이 동일한지 확인한다고 명시되어 있습니다. 그런데 아무래도 수출 대상이 적합한지는 확인하지 않는 것 같죠?
Debian 8(32비트) 사용
>>> /etc/sudoers.d/jupyter: syntax error near line 1 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 1 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 2 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 2 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 3 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 4 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 4 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 4 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 4 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 5 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 6 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 6 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 6 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 6 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 7 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 8 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 8 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 8 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 8 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 9 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 9 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 10 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 11 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 11 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 12 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 13 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 13 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 14 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 14 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 15 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 16 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 16 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 17 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 18 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 18 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 19 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 20 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 20 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 21 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 22 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 22 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 22 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 22 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 22 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 22 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 23 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 24 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 24 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 25 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 26 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 26 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 27 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 27 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 28 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 29 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 29 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 30 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 31 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 31 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 32 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 33 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 33 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 34 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 35 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 35 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 35 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 35 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 35 <<<
>>> /etc/sudoers.d/jupyter: syntax error near line 35 <<<
sudo: parse error in /etc/sudoers.d/jupyter near line 1
sudo: no valid sudoers sources found, quitting
sudo: unable to initialize policy plugin
답변1
루트 비밀번호를 알고 있다면 다음을 수행할 수 있습니다.
$ su root
# rm /etc/sudoers.d/jupyter
visudo
sudo 파일을 확인합니다만약에편집 모드에서는 내보내기 모드로 실행합니다.