1834459 Members
2520 Online
110067 Solutions
New Discussion

Sudo Configuration issue

 
bachi
Occasional Advisor

Sudo Configuration issue

Hi,

I have issue with sudo configuration. we have sudo configuration for SAP user environment.

when i am trying to get SAP comand with sudo access , i am getting Errors.

# sudo -u t01adm /sapmnt/t01/exe/brtools

error:BR0152E Environment variable ORACLE_SID is not set.

this error saying that , there is no Environmental setup fo this t01. but when i did echo i am able to get ORACLE_SID.

could you please help some to resolve this issue.

Thanks,
Balaji.
1 REPLY 1
Ivan Krastev
Honored Contributor

Re: Sudo Configuration issue

Use env_keep option in sudoers file - http://sudo.ws/sudo/man/sudoers.html#item_env_keep

You can use the following:

Defaults env_keep+="ORACLE_SID"


regards,
ivan