[sudo-users] Pivot user for launching sqlplus
Todd C. Miller
Todd.Miller at sudo.ws
Mon Jun 24 16:32:44 MDT 2019
Commands run by sudo won't have the shell startup files sourced.
That is something that only happens for a login shell. You may be
able to achieve what you want by running:
sudo -u superora -i sqlplus
which will wrap the command in a login shell. This will
require that you allow the invoking user to run the target
user's shell, though.
For example, assuming superora's shell is /bin/sh, this should work:
User_Alias SUPERORA = user1, user2
SUPERORA ALL=(superora) /bin/sh -c sqlplus, /bin/sh -c sqlplus *
Hope that helps.
More information about the sudo-users