0

So I installed Debian yesterday, and I tried to make myself a sudoer so that I don't have to be root every time I try to install something. However, this always happens when I add my user to the sudo group.

gabe@GabePC:~$ sudo apt-get install steam
[sudo] password for gabe:
gabe is not in the sudoers file.  This incident will be reported.
gabe@GabePC:~$ su -
Password:
root@GabePC:~# adduser gabe sudo
The user `gabe' is already a member of `sudo'.
root@GabePC:~#

Is there something else I have to change in order to make myself a sudoer?

3
  • How does your /etc/sudoers file look? (I don't use Debian, but I've got the wheel-group configured to have sudo-rights, not the sudo-group.)
    – Anko
    Oct 3, 2014 at 12:51
  • I tried adding my username to the sudoers file by using visudo but that didn't work either
    – Felsg2574
    Oct 3, 2014 at 12:56
  • OK, but in what way? Does your /etc/sudoers resemble this? Importantly, does it include the line %sudo ALL=(ALL:ALL) ALL? That's what gives the sudo-group powers.
    – Anko
    Oct 3, 2014 at 13:08

2 Answers 2

0

The changes will take effect as soon as you log out and log back in again. If you do that or simply reboot, everything should work as expected.

1
  • Ok, I haven't tried that yet so that is probably the problem. Thanks.
    – Felsg2574
    Oct 3, 2014 at 19:17
0

In order to be able to execute commands as root, you have to be listed in the sudoers file. You should edit the sudoers-file with the visudo-command:

  1. Edit the visudo-File as root : visudo

  2. Navigate to the section # User privilege specification (Not really a section, but you should keep the layout..)

  3. Hit the Letter 'i' to get into the INSERT-Mode

  4. Add the followling line: gabe ALL=(ALL) ALL , DON'T remove/edit any other line !

  5. Hit [ESC] to exit the INSERT-MODE and type :wq

  6. Log out and log in again.

2
  • I tried doing that, but when I pressed esc nothing happened and it just added the ":wq" to the end of the ALL=(ALL) ALL line
    – Felsg2574
    Oct 3, 2014 at 15:01
  • Please remove the ":wq" at the end of the line. When you press 'i' there should be -- INSERT -- in the bottom left corner and you will be able to edit the file. With the [ESC]-Key you should be able to leave the insert mode and the -- INSERT -- should disappear . The command :wq writes the changes to the file and quits the editor.
    – blax
    Oct 3, 2014 at 17:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .