I have a problem for permission using "sudo" on putty (connected to raspberry pi3).

My usrname is: karim My password: 0000 Each time, I have got this error when executing a command line " karim is not in the sudoers file. This incident will be reported"

What should I do to execute any command line as adminstrator in this case? Waiting your helps!! Have a grat day!!!

2 Answers 2


Login as pi.

Copy /etc/sudoers.d/010_pi-nopasswd as 011-karim-nopasswd. Edit that and change pi to karim. You will need to use sudo for that.


Login as karim.

Test whether sudo works for you.

Later you can remove the 010_pi-nopasswd file to disable sudo for pi.

  • I have tried your suggestion, but the problem is not resolved yet!!!! is there any other suggestion ???? Dec 26, 2018 at 10:56
  • Add your karim userid to the groups that pi is in.
    – Dougie
    Dec 26, 2018 at 14:26

By default sudo on Raspbian is configured that a user being in group sudo can use it. So check if karim is in group sudo with:

karim@raspberrypi ~$ groups

If group sudo is not shown then you have to add karim to this group. The problem is that you have to be in group sudo to do it ...

Because user pi is in this group you have to logout from karim and login as user pi. Then execute this command:

pi@raspberrypi ~$ sudo adduser karim sudo

Logout and login as karim and things should go.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.