Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

run shell script as sudo user without giving sudo passowrd from normal usr

techshell81Nov 12 2012 — edited Nov 13 2012
Hi ,

i am running shell script from my account with sudo user what is the problem in my procedure.

Please if any thing wrong in my procedureprocedure or any permission required please let me know.


here is the my procedure and sudo permissions.


[techm@ppsol04 ~]$ sudo su - dadm sudo -u dadm /u01/ora/tools/Dbmon/scripts/export.sh
Sorry, user techm is not allowed to execute '/u01/ora/tools/Dbmon/scripts/export.sh' as dadm on ppsol04.
[dchandu@ppsol04 ~]$ sudo -l
Matching Defaults entries for techm on this host:
env_keep=SSH_AUTH_SOCK, !authenticate, env_reset, always_set_home, !requiretty


sudo permissions :



sudo -l
Matching Defaults entries for techm on this host:
env_keep=SSH_AUTH_SOCK, !authenticate, env_reset, always_set_home, !requiretty

User techm may run the following commands on this host:
(ALL) NOPASSWD: /local/bin/hardened_profile.sh
(root) NOPASSWD: /bin/su - dora
(root) NOPASSWD: /bin/su - doraadm
(root) NOPASSWD: /bin/su - docenter
(root) NOPASSWD: /bin/su - tora
(root) NOPASSWD: /bin/su - toraadm
(root) NOPASSWD: /bin/su - tocenter
(root) NOPASSWD: /bin/su - hora
(root) NOPASSWD: /bin/su - horaadm
(root) NOPASSWD: /bin/su - hocenter
(root) NOPASSWD: /bin/su - agcfdwf4
(root) NOPASSWD: /bin/su - pora
(root) NOPASSWD: /bin/su - dadm
(root) NOPASSWD: /bin/su - pocenter
(root) NOPASSWD: /bin/su - agcfdwp4


Thanks
tech
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 11 2012
Added on Nov 12 2012
2 comments
1,941 views