sudo su - user not working

Hi All, I need your expertise to solve my problem, my account has permission to make sudo and su but when I try to switch user in a shell, it does not work with following message:
"Sorry, user jmbeltra is not allowed to execute '/usr/bin/su -c echo HELLO THERE - oracle' as root on dbbr1k01"
I logged on with my personal account (jmbeltra) and try to switch to oracle account into a shell.
Could you assist me about ?? :slight_smile:

It means what it says. Sudo is not configured to let you do that. Ask your administrator to configure it for you.

try this as a command note the double quotes

sudo su - oracle -c "echo 'hi there' "  

the syntax is su - [username] -c " [command] "
The quotes are need if command is more than one word.

I think it is a syntax problem -

Thanks for your prompt answers, so I've tried with different similar syntaxis ways as
sudo su - oracle -c "command"
sudo su - oracle "-c command"
sudo su - oracle -c 'command';

and result the same
Also an SA checked out configuration and it looks fine, in fact I can do this in commnad line properly good, the point is into a shell is when it doesn't work

There's nothing wrong with it per-se. They simply haven't configured sudo to allow you to do it. sudo can be used in a variety of ways, and they don't have to let you use it that way if they don't actually want to.

Ask your administrator to do so.