미친 나란 인간 🤢🤢🤢
sudoers 락걸려서 sudoers.tmp 파일을 삭제한다는걸 .tmp를 안하고 그냥 쌩 sudoers 파일을 삭제해버렸다.. 멘붕이 왔지만 해결방법은 다음과 같음
일단 중요한건 절!!!대!!!! 그 터미널 끄지 말 것
이거 꺼버리면 복구도 안된다
파일 지워버린 그 터미널에서 복구를 진행해야된다.
쉽게말하면 그냥 sudoers 파일을 다시 만들면 된다.
### 디폴트 sudoers 파일 내용 만들기
nano /etc/sudoers
### 기본적으로 필요한 내용 붙여넣기
Defaults env_reset
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
root ALL=(ALL:ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
그 다음 파일 저장하고 문법 검사 고고
visudo -c
이 때 아무런 에러가 뜨지않으면 복구 성공...
진짜 간 밤에 심장 철렁했다...
으어어어 😶😶😶🙄🙄🙄
'ERROR!' 카테고리의 다른 글
| [VSCode] vscode the remote host does not meet the prerequisites for running vs code server. 에러 해결 방법 (3) | 2025.08.05 |
|---|---|
| [오류해결] benchbase "The table is full" 오류 해결 (0) | 2025.05.19 |
| [Colab] 런타임 유지, 안끊기게 하기 (0) | 2024.08.16 |
| [vscode] ssh 접속 에러 / xhr failed (0) | 2024.07.29 |
| [MySQL] Job for mysql.server.service failed because the control process exited with error code. (1) | 2024.07.22 |