Linux Configure sudo -- Validation Error

Hi,

There is a validation Error for the Linux Configure Sudo task.
I added the user to wheel group and tested the sudo. Everything worked fine.
Yet, my task was failed with the message “- sudo access on App Server 1 is not configured properly”

I copied the steps I followed. See below

thor@jump_host ~$ ssh tony@stapp01

The authenticity of host ‘stapp01 (172.16.238.10)’ can’t be established. ECDSA key fingerprint is SHA256:ev6RdWDyRgF6LWAGdvbDu/7RVsc/yOxidxp7SmjBGok. ECDSA key fingerprint is MD5:a4:55:6c:60:e2:54:8e:f3:78:aa:18:ca:c8:3d:0e:f0. Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added ‘stapp01,172.16.238.10’ (ECDSA) to the list of known hosts. tony@stapp01’s password:

[tony@stapp01 ~]$ cat /etc/passwd | grep anita

anita:x:1002:1002::/home/anita:/bin/bash

[tony@stapp01 ~]$ usermod -aG wheel anita

-bash: /usr/sbin/usermod: Permission denied

[tony@stapp01 ~]$ sudo usermod -aG wheel anita

We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.

#2) Think before you type.

#3) With great power comes great responsibility.

[sudo] password for tony:

[tony@stapp01 ~]$ sudo su anita

[anita@stapp01 tony]$ exit exit

[tony@stapp01 ~]$ exigt

-bash: exigt: command not found

[tony@stapp01 ~]$ exit

logout Connection to stapp01 closed.

thor@jump_host ~$ ssh steve@stapp02

The authenticity of host ‘stapp02 (172.16.238.11)’ can’t be established. ECDSA key fingerprint is SHA256:lHXu7airHUavwLqUFHqULsEwl4O0cf3LqgzvCTowkkQ. ECDSA key fingerprint is MD5:bf:70:d3:8e:90:6f:37:32:f2:a4:1d:e2:05:9a:dd:b9.

Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added ‘stapp02,172.16.238.11’ (ECDSA) to the list of known hosts.

steve@stapp02’s password:

[steve@stapp02 ~]$ sudo usermod -aG wheel anita

We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.

#2) Think before you type.

#3) With great power comes great responsibility.

[sudo] password for steve: [steve@stapp02 ~]$ sudo su anita [anita@stapp02 steve]$ exit exit [steve@stapp02 ~]$ exit logout Connection to stapp02 closed. thor@jump_host ~$ ssh banner@stapp03 The authenticity of host ‘stapp03 (172.16.238.12)’ can’t be established. ECDSA key fingerprint is SHA256:34W0b+nltZ1aAwMV7k0LlhcjLDpuC4nmrfODWrUmBUw. ECDSA key fingerprint is MD5:24:f7:7d:85:c1:ce:0e:c5:42:02:16:2c:f6:8a:dd:e7. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added ‘stapp03,172.16.238.12’ (ECDSA) to the list of known hosts. banner@stapp03’s password: [banner@stapp03 ~]$ cat /etc/passwd | grep anita anita:x:1002:1002::/home/anita:/bin/bash [banner@stapp03 ~]$ sudo usermod -aG wheel anita

We trust you have received the usual lecture from the local System Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.

#2) Think before you type.

#3) With great power comes great responsibility.

[sudo] password for banner: [banner@stapp03 ~]$ sudo su anita [anita@stapp03 banner]$ exit exit [banner@stapp03 ~]$ exit logout Connection to stapp03 closed. thor@jumphost ~$ thor@jumphost

Hi @Loki.Kadavra1

Please note that, along with providing the sudo access to the user you need to make sure user is able to run the sudo commands without sudo password. Also I didn’t see you actually tested the sudo access after adding user to the wheel group.

Hi Loki,

you need to add the user to visudo and set not to use password as below

run below cmd
sudo visudo
the add below on the end of the file

anita ALL=(ALL) NOPASSWD:ALL