Cyberithub

Solved "User is not in the sudoers file. This incident will be reported"

Advertisements

In this article, we will see how to solve "User is not in the sudoers file. This incident will be reported" error on Linux. Sometimes you might have observed that when you try to run some command with sudo access then you end up in getting "User is not in the sudoers file. This incident will be reported" on the output. Here user is that user through which you are trying to run the sudo command.

The same incident happened to me as well. This error basically will show when user does not have the sudo access to run administrative tasks. So to solve this error you need to grant sudo access to that specific user. This can be done by following the steps described in below section. To understand better, here I have explained the steps using a real world example.

Advertisements

 

Solved "User is not in the sudoers file. This incident will be reported"

Solved "User is not in the sudoers file. This incident will be reported"

Also Read: How to Install Jdownloader 2 on Ubuntu 20.04 LTS (Focal Fossa)

In my case, when I was trying to add the repo using sudo add-apt-repository ppa:jd-team/jdownloader command then I noticed cyberithub is not in the sudoers file. This incident will be reported error on the output as shown below.

Advertisements
cyberithub@debian:~$ sudo add-apt-repository ppa:jd-team/jdownloader
[sudo] password for cyberithub:
cyberithub is not in the sudoers file. This incident will be reported.

To solve this error, you need to first switch to the root account using su root command as shown below.

cyberithub@debian:~$ su root
Password:
root@debian:/home/cyberithub#

Then you need to open /etc/sudoers file using nano editor as shown below.

Advertisements
root@debian:/home/cyberithub# nano /etc/sudoers

Next you need to add below configuration in the sudoers file to allow user cyberithub to run admin or privileged commands. Once done, press Ctrl+X to save and exit.

cyberithub ALL=(ALL:ALL) ALL

So now your /etc/sudoers file should look like below.

Advertisements
root@debian:/home/cyberithub# cat nano /etc/sudoers
cat: nano: No such file or directory
#
# 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"

# Host alias specification

# User alias specification

# Cmnd alias specification

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

# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "@include" directives:

@includedir /etc/sudoers.d

After adding and saving the configuration, you need to exit from the root account using exit command as shown below.

root@debian:/home/cyberithub# exit
exit

Now try to again run the same command with sudo access and see if it is working now.

cyberithub@debian:~$ sudo add-apt-repository ppa:jd-team/jdownloader
[sudo] password for cyberithub:
JDownloader is open source, platform independent and written completely in Java. It simplifies downloading files from One-Click-Hosters like Rapidshare.com or Megaupload.com - not only for users with a premium account but also for users who don't pay. It offers downloading in multiple parallel streams, captcha recognition, automatic file extraction and much more. Additionally, many "link encryption" sites are supported - so you just paste the "encrypted" links and JDownloader does the rest. JDownloader can import CCF, RSDF and DLC files.
The jdownloader-installer package contains only a desktop file and a script, which will download and launch the latest JDownloader. The downloaded files will be stored in ~/.jdownloader by default.
Run these commands in a terminal to install the jdownloader-installer package:

sudo add-apt-repository ppa:jd-team/jdownloader
sudo apt-get update
sudo apt-get install jdownloader-installer
More info: https://launchpad.net/~jd-team/+archive/ubuntu/jdownloader
Press [ENTER] to continue or ctrl-c to cancel adding it

gpg: keybox '/tmp/tmpxzmhqs_c/pubring.gpg' created
gpg: /tmp/tmpxzmhqs_c/trustdb.gpg: trustdb created
gpg: key D6B6DB186A68F637: public key "Launchpad JDownloader PPA" imported
gpg: Total number processed: 1
gpg: imported: 1
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
gpg: no valid OpenPGP data found.

So as you can see above, this time it worked successfully. This confirms that sudo access has been granted to the user. Hope the above solution works for you as well. Please let me know your feedback in the comment box !!

8 thoughts on “Solved "User is not in the sudoers file. This incident will be reported"”

Leave a Comment