2017년 4월 19일 수요일

Ubuntu 16.04LTS 에서 sudo 명령이 되지 않을 때

테스트를 진행하던 도중에 무엇이 문제였는지 모르겠지만 갑자기 아래와 같은 오류가 발생했습니다. 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

그대로 따라하니 해결되었네요. 복구는 했는데, 원인이 무엇인지는 지금도 모르겠네요. 다음에는 차근차근 기록을 좀 해야 겠습니다.


MySQL 에서 [ERROR] Can't find messagefile '/usr/share/mysql/english/errmsg.sys' 발견 시 조치방법

AWS의 EC2 기반으로 CentOS 6.8을 올리고 MySQL을 설치 중이었는데, 아래와 같은 오류를 보게 되었습니다. 보통은 yum 으로 설치했을 때 문제없이 설치되었는데, 아마도 OS 설정이 조금 다른 탓인지 오류가 발생해서 찾아 보았는데요. ...