--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.
--The newly created user was not added to the sudo group.
--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.)
```
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
Log in to user miriwo
and execute the following command.
$ sudo su
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
Log in to the Linux machine as a user with administrator privileges and execute the following command.
$ sudo gpasswd -a ookawa sudo
For confirmation, log in to the Linux machine again as user miriwo
and execute the following command.
$ sudo su
Confirmed that the error disappeared.
Recommended Posts