As root, created a new non-root user on RHEL 7.5
appuser:x:1903:1903:appuser:/home/appuser:/bin/bash
A non-root user to be able to sudo to appuser
,
sudo -u appuser
without a password,
What are the changes required on RHEL 7.5?
linuxrhelsudousers
As root, created a new non-root user on RHEL 7.5
appuser:x:1903:1903:appuser:/home/appuser:/bin/bash
A non-root user to be able to sudo to appuser
,
sudo -u appuser
without a password,
What are the changes required on RHEL 7.5?
Best Answer
You can edit the "User privilege specification" section of
/etc/sudoers
, adding:This will allow
non-root-user
to run all commands asappuser
.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:This special editor checks the
sudoers
file for errors before saving and refuses to save it if errors are found.