As root, created a new non-root user on RHEL 7.5
A non-root user to be able to sudo to
sudo -u appuser
without a password,
What are the changes required on RHEL 7.5?
You can edit the "User privilege specification" section of
non-root-user ALL = (appuser) NOPASSWD: ALL
This will allow
non-root-user to run all commands as
non-root-user will not be allowed to run commands as root.
Note that errors in
/etc/sudoers can make a system unusable. The file should only be edited with:
$ sudo visudo
This special editor checks the
sudoers file for errors before saving and refuses to save it if errors are found.