새로 생성한 계정으로 전환하여 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

 

 

'운영체제 > 리눅스' 카테고리의 다른 글

[APT] Could not get lock /var/lib/dpkg/lock 해결방법  (0) 2019.02.26