On Fri, Jan 22, 2021 at 03:33:50PM -0000, Russ Long via FreeIPA-users wrote:
I'm trying to come up with a Sudo rule that will allow a user to
"su" to only a single specified user. I need to give a DBA access
to the oracle user account.
This serverfault article details exactly what I want to do,
however this is not for FreeIPA.
Which article?
I've tried creating a sudo command that's "/usr/bin/su -
USER"
and other variations to no avail.
I've also tried creating a sudo rule that allows all commands to
be run as "USER".
Is there a specific reason why you need "sudo su" instead of using
just sudo?
With this rule in /etc/sudoers:
fromuser hostname = (touser) NOPASSWD: ALL
The user "fromuser" can execute any command on the machine
"hostname" as the user "touser" without entering a password, for
example:
$ sudo -u touser /usr/bin/bash
to start a shell.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt