I have installed Debian 10 on Dell Inspiron with an AMD processor. I am using the KDE Plasma desktop. When I try
sudo dpkg -i ./palemoon_28.6.1+repack-2_amd64.deb
I get
[sudo] password for peter:
peter is not in the sudoers file. This incident will be reported.
I logged in as root and entered
/usr/sbin/adduser peter
This returned
adduser: The user `peter' already exists.
I then tried the following as root
chmod 0440 /etc/sudoers
When I try to sudo, in the peter account, I still get
peter is not in the sudoers file. This incident will be reported.
I then try the following as root
sudo usermod -aG sudo,adm peter
Still get the same reslt when I try to sudo from the peter account.
Opening a new terminal, for the peter account, does not change anything.
Edit
cat /etc/sudoers
root@debian:/home/peter/Downloads# cat /etc/sudoers
#
# 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
root@debian:/home/peter/Downloads# id peter
uid=1000(peter) gid=1000(peter) groups=1000(peter),4(adm),24(cdrom),25(floppy),27(sudo),29(audio),30(dip),44(video),46(plugdev),109(netdev),112(bluetooth),116(lpadmin),117(scanner)
cat /etc/sudoers
andid peter
to your question. Also,/etc/sudoers
already has 440 permissions so there's no need to runchmod
on it. – Nasir Riley Aug 18 '19 at 23:48newgrp sudo
in that new window, then the sudo command. – Jeff Schaller Aug 19 '19 at 00:55sudo
group? Groups don’t take effect until that user logs in again. A full login, not just opening a new terminal. – Peschke Aug 19 '19 at 07:46