After adding a user to sudoers, it doesn't have access to run sudo.
I'm really stumped as to what the issue is but I am running CentOs 7.9 with Plesk installed.
I have added the main Plesk subscription user to the
wheel group and uncommented the following line in
## Allows people in group wheel to run all commands
wheel ALL=(ALL) ALL
I save sudoers, and
su to the user from root and any command starting with
sudo just returns:
sudo: command not found
The $PATH in
sudoers is as follows:
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin
Although I have also tried the following to no avail:
Defaults secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/opt/plesk/php/7.4/bin:/root/bin
I am trying to get the user in question sudo access so that they can access
crontab as a cron job needs to run under that specific user (and I'm unable to get it working in the Plesk interface).
Currently, the user just gets
crontab: command not found - in fact, pretty much all commands are not found (not sure if that is because these ones are all only usable for sudo users).
Can anyone advise as to what the heck I need to do to run sudo for this user? Thanks in advance. 👍
Edit for @terdon
grep username /etc/passwd returns the following:
username1 that I am wanting to grant sudo access to).
$PATH queries, I ran that after
su username1 from root user. I have not modified that path, it was just like that anyway.