I've added myself into the sudoers users list by using the command
root@debian:/home/oshirowanen#adduser oshirowanen sudo
If I try to run that command again,
root@debian:/home/oshirowanen# adduser oshirowanen sudo
The user `oshirowanen' is already a member of `sudo'.
root@debian:/home/oshirowanen#
All looks good so far.
When I then exit the root user and try to install/remove/search something using my own account, it doesn't work and complains that I am not a sudoer... For example
root@debian:/home/oshirowanen# exit
exit
oshirowanen@debian:~$ sudo aptitude search ice
[sudo] password for oshirowanen:
oshirowanen is not in the sudoers file. This incident will be reported.
oshirowanen@debian:~$
Why is this happening?
This is what I get from visudo
#
# 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
# 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
/etc/sudoers
look like? – l0b0 Mar 21 '13 at 09:13