테스트를 진행하던 도중에 무엇이 문제였는지 모르겠지만 갑자기 아래와 같은 오류가 발생했습니다. sudo 를 쓸 수가 없게 되었네요..
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
특별히 permission 을 변경하거나 다른 뭔가를 설치한 기억이 없어서 한참
검색하다가, 아래 사이트의 내용을 발견하여 시도해 보았습니다.
https://unix.stackexchange.com/questions/187672/restore-sudo-privileges
First restart the pc, press SHIFT key while Ubuntu is booting.
This will bring you up the boot menu.
Go to Advanced Options.
Select your OS version in (recovery mode), and press Enter Key.
example : Ubuntu 14.04 (recovery mode)
It will bring you up another screen. Now select “Drop to root shell prompt” and press Enter. It will load a command line at the bottom of the screen.
Now run each of the following commands.
# mount -o remount,rw /
# mount -a
# chown root:root /usr/bin/sudo
# chmod 4755 /usr/bin/sudo
# init 6
그대로 따라하니 해결되었네요. 복구는 했는데, 원인이 무엇인지는 지금도 모르겠네요. 다음에는 차근차근 기록을 좀 해야 겠습니다.
안녕하세요..
답글삭제시놀로지 사용하고 있는데 실수로 usr권한을 777으로 바꾸면서 sudo도 하위라 같이 변경되어
블로깅 해주신 내용처럼 오류가 발생하고 있습니다.
그런데,, 시놀로지에서 처음에 root 비번을 변경을 안하면서 root 권한도 얻지 못하고 있습니다.. sudo가 안되니 sudo -i도 못하고 있습니다..ㅠ
혹시 해결방안이 있을까해서 답글 달게 되었습니다..
ㅋㅋㅋ 나두여 ㅋㅋㅋ
삭제