Linux Ubuntu16.04 I got a little scary error when I ran a command using sudo

Purpose

--I will summarize the story that solved the error that occurred when logging in to the created user and executing the command with sudo immediately after creating the user.

Conclusion

--The newly created user was not added to the sudo group.

What happened

--When I executed the command with sudo, the following error occurred. The user of the execution environment is miriwo.

```terminal
$ sudo su
[sudo] password for miriwo:
>miriwo is not in the sudoers file. This incident will be reported. (Japanese translation:miriwo is not registered in the sudoers file. This incident was reported.)
```

Work done

  1. Log in to the Linux machine as a user with administrator privileges and execute the following command to create user miriwo.

    $ sudo adduser -a miriwo
    
  2. Log in to user miriwo and execute the following command.

    $ sudo su
    
  3. I got the following error after entering the password for user miriwo.

    miriwo is not in the sudoers file. This is incident will be reported
    

Solution

  1. Log in to the Linux machine as a user with administrator privileges and execute the following command.

    $ sudo gpasswd -a ookawa sudo
    
  2. For confirmation, log in to the Linux machine again as user miriwo and execute the following command.

    $ sudo su
    
  3. Confirmed that the error disappeared.

Recommended Posts

Linux Ubuntu16.04 I got a little scary error when I ran a command using sudo
I got a Value Error when using JUMAN ++ with PyKNP
I got a UnicodeDecodeError when pip install on ubuntu
I got an error when using Tensorboard with Pytorch
I get a "bash: sudo: command not found" error on LINUX (Debian) built on Docker
I got a TypeError:'int' object is not iterable when using keras
I got an error when I ran composer global require laravel / installer
[Linux / GCP] Corrected the error that occurred when using the Git command.
I got an error when I ran meteor add accounts-password and got hooked
What I stumbled upon when using CodeIgniter on a Linux server
What I got into when using Tensorflow-gpu
When I try to go back using chainer, it fits a little
Summary of linux command techniques that I knew when I was a fledgling engineer
[Linux] Let's talk about when I stumbled upon a symbolic link I was using.
I got an error when saving with OpenCV
When I get a chromedriver error in Selenium
After installing basemap, I got a numpy import error
Error around GUI when using PyQt5 on Ubuntu (WSL2)
SoC FPGA: A small story when using on Linux
I got "ModuleNotFoundError: No module named'azure'" when running a program using Azure SDK for Python
When creating a pipenv environment, I got addicted to "Value Error: Not a valid python path"
I got a sqlite3.OperationalError
I got an SSL Error when I installed Anaconda in a new environment, so I solved it (Windows10, Anaconda3-2019.10)
I get an OS Error: [Errno 8] Exec format error when running a Flask application with a python command