Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have already read a lot of posts about enabling sudo-access for a specific user but those couldn't help me so far.
The situation is:
I'm running Debian Testing. On the system there are only two accounts: 'root' and a user account 'benny'. The user 'benny' should be able to run commands with root privileges using sudo (of course I installed sudo first), which is why I edited the '/etc/sudoers' file using visudo as follows:

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
benny   ALL=(ALL:ALL) ALL #<<<<<<<<<<<<<<< EDIT HERE!

# 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
ALL ALL= NOPASSWD: /usr/sbin/g15daemon

This did not work at all - when issuing the 'sudo' command it keeps saying 'benny is not in the sudoers file. This incident will be reported.' So I added benny to the group 'sudo', as it was often suggested:

usermod -aG sudo benny

After a re-login as 'benny' the command



benny cdrom sudo fuse

which seems fine to me. Also

 cat /etc/group | grep sudo 



However if I try, for example

sudo apt update

it still keeps saying that benny was not in the sudoers-file.
I've really read a lot about this issue and everyone just advices one of the two steps, I mentioned above.
What am I missing here? I gues it's something really stupid, but I do not see it. Any help is appreciated! Thanks in advance!

share|improve this question
Have you logged out and logged back in? – Matt H May 6 '14 at 22:34
By the way, no need to add benny to sudoers, just place him in the sudo group which you've already done. The only reason to put benny specifically in sudoers is if you want him to have a different set of privileges than the sudo group. In your case they are the same. – Matt H May 6 '14 at 22:35
Yes I did, I even restarted the whole system - just to make sure... – Benjamin Kalloch May 6 '14 at 22:35
Have you tried creating a new user and adding that user to the sudo group, to see if that works? This may help to narrow down where the problem is happening. – Jason Lewis May 14 '14 at 23:27
What does "sudo -U benny -l" return when run as root? I suspect a typo or something similar in the sudoers file. Also is there anything in /etc/sudoers.d? – Bram Nov 21 '14 at 17:04

I'm not 100% sure, but as this site points, permissions should be granted through groups. The user is effectively in the sudoers but maybe has not privileges of sudoers (kinda weird though)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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