![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| sudo | sydney2008 | UNIX for Dummies Questions & Answers | 3 | 08-25-2008 02:34 AM |
| sudo, or not sudo: that is the question | iBot | UNIX and Linux RSS News | 1 | 02-07-2008 01:40 PM |
| using sudo in HP-UX | yoavbe | Shell Programming and Scripting | 1 | 07-17-2006 08:54 AM |
| sudo | omran | UNIX for Advanced & Expert Users | 2 | 09-29-2002 01:57 AM |
| How to use SUDO | syedifti | UNIX for Dummies Questions & Answers | 1 | 10-29-2001 01:40 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Sudo help needed
Scenario: I have two servers, A and B. Server A is using autosys to connect to server B via ssh in order to run scripts. The scripts to be run on server B must be run by user "weblogic".
So what I did was make the autosys user connect with a ssh key from server A to server B. After that I gave sudo permissions to autosys so that it may run commands as weblogic. Here's my excerpt from visudo: Code:
User_Alias SU_AUTOSYS = autosys Cmnd_Alias AUTOSYS_SU = /usr/bin/su - weblogic SU_AUTOSYS ALL = NOPASSWD: AUTOSYS_SU Code:
#!/bin/sh args="$@" sudo su - weblogic $args Code:
ssh serverB "/opt/home/autosys/runasweblogic.sh /opt/weblogic/whateverscript.sh" Any ideas? I'm going nuts here... ![]() Last edited by blane; 10-24-2008 at 12:00 PM.. |
|
||||
|
Actually, I went a little further than that just for security, and now it's working.
Here's the entry in the sudoers file now: Code:
autosys ALL =(weblogic) /opt/home/autosys/test.sh, /opt/weblogic/wls92/domains/dev05/batch/*.sh, /opt/weblogic/wls92/domains/dev05/*.sh Thanks for the assistance! I should have done it this way in the first place. ![]() |
![]() |
| Bookmarks |
| Tags |
| autosys |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|