I am having a problem on that whatever the contents of /etc/sudoers file I cannot elevate to sudo with anything, even with a password (wrong password - sorry, try again) though the password is correct.
Below are the contents from /etc/sudoers, which should be correct, unless in combination with other settings are broken. So, it must be something else.
FYI, I installed Puppet on my machine which in the beggining was controlling sudoers to my knowledge, but then I removed monitoring.
My normal privileges user is part of the adm group.
Defaults mail_badpass
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
root ALL=(ALL:ALL) ALL
%adm ALL=(ALL) ALL
%sudo ALL=(ALL:ALL) ALL
#includedir /etc/sudoers.d
Also, below is the output of /etc/sudoers.d folder and the contents of each file:
root@ns1:/home/vag# ls -la /etc/sudoers.d/
total 28
dr-xr-x--- 2 root root 4096 Sep 22 23:46 .
drwxr-xr-x 151 root root 12288 Sep 23 19:19 ..
-r--r----- 1 root root 80 Sep 22 23:46 10_admins
-r--r----- 1 root root 90 Jun 4 20:06 60_mike
-r--r----- 1 root root 91 Jul 10 15:00 99-snapd.conf
root@ns1:/home/vag# cat /etc/sudoers.d/99-snapd.conf
##Allow snap-provided applications to work with sudo
Defaults secure_path += /snap/bin
root@ns1:/home/vag# cat /etc/sudoers.d/60_mike
This file is managed by Puppet; changes may be overwritten
mike ALL=(ALL) NOPASSWD: ALL
root@ns1:/home/vag# cat /etc/sudoers.d/10_admins
This file is managed by Puppet; changes may be overwritten
%adm ALL=(ALL) ALL
Can you help me to be able to use sudo again without having to "su root" every time?
Regards, Evang
ls /etc/sudoers.d/
– steeldriver Sep 23 '20 at 18:06vag@ns1:/home/vag$ sudo vi /etc/passwd [sudo] password for vag: Sorry, try again. [sudo] password for vag: Sorry, try again. [sudo] password for vag: sudo: 2 incorrect password attempts vag@ns1:/home/vag$ sudo su [sudo] password for vag: Sorry, try again. [sudo] password for vag: Sorry, try again. [sudo] password for vag:
– vag Sep 23 '20 at 18:26