운영체제/리눅스

[ROOT 권한 문제] not in the sudoers file

김깔라 2019. 2. 26. 23:23

새로 생성한 계정으로 전환하여 sudo 명령어를 쓰는 경우 sudoers file에 대상이 존재하지 오류가 발생하게 된다.

 

odroid@odroid:~$ sudo apt install tasksel
[sudo] password for odroid:
odroid is not in the sudoers file.  This incident will be reported.
 

 

해결방법은 sudoers file에 보면 root와 같이 ID를 추가해주면 된다.

 

root@odroid:~# sudo vi /etc/sudoers

# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults        env_reset
Defaults        mail_badpass
Defaults        secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin://
sbin:/bin:/snap/bin"

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root    ALL=(ALL:ALL) ALL
odroid  ALL=(ALL:ALL) ALL