일반 사용자에게 sudo 권한 주기 작업환경: ubuntu 20.04 LTS * 일반 사용자 계정 등록
1 2 3 4 5 |
# useradd -d /home/testuser -m -s /bin/bash -c "test" testuser root@ubuntu:/etc# passwd testuser New password: Retype new password: passwd: password updated successfully |
일반 사용자인 testuser로 로그인 후에 sudo 명령을 내리면 아래처럼 sudoers 파일에 등록되지 않았다는 메시지가 나온다.
1 2 3 4 |
testuser@ubuntu:~$ sudo -s [sudo] password for testuser: testuser is not in the sudoers file. This incident will be reported. testuser@ubuntu:~$ |