Unix/Linux Go Back    



One user to su to another without allowing root access and password

UNIX for Advanced & Expert Users




Kindly Note - This is a Single User Post by Forum Member pokhraj_d Regarding:
One user to su to another without allowing root access and password.
Please Follow The Primary Link Above to View the Full Discussion.

   
Old Unix and Linux 04-10-2017   -   Original Discussion by pokhraj_d
pokhraj_d pokhraj_d is offline
Registered User
 
Join Date: Jan 2012
Last Activity: 5 October 2017, 9:54 AM EDT
Posts: 38
Thanks: 1
Thanked 0 Times in 0 Posts
One user to su to another without allowing root access and password

Hello Gurus,
I want One user to su to another without allowing root access and password.
I want to run a specific command as below from user am663:
---------------------------------------------------------

Code:
sudo -u appsprj4 /home/appsrj4/scripts/start_apache.sh

-------------------
But everytime I am facing the below error

Code:
[sudo] password for am663:
sudo: /home/appsrj4/scripts/stop_oacore.sh: command not found

----------
Below is the entry from /etc/sudoers file:
------------------------

Code:
am663   ALL=(appsprj4)          NOPASSWD: /home/appsprj4/scripts/start_apache.sh
am663   ALL=(appsprj4)          NOPASSWD: /home/appsprj4/scripts/stop_apache.sh
am663   ALL=(appsprj4)          NOPASSWD: /home/appsprj4/scripts/start_oacore.sh
am663   ALL=(appsprj4)          NOPASSWD: /home/appsprj4/scripts/stop_oacore.sh
am663   ALL=(appsprj4)          NOPASSWD: /u03/oracle/EBSDEV/fs1/inst/apps/EBSDEV_emaprjebs01/admin/scripts/adapcctl.sh
am663   ALL=(appsprj4)          NOPASSWD: /u03/oracle/EBSDEV/fs1/inst/apps/EBSDEV_emaprjebs01/admin/scripts/admanagedsrvctl.sh

Please advice on this.

Thanks-
Pokhraj
Moderator's Comments:
Please use CODE tags (not HTML and ICODE tags) for full line and multi-line sample input, sample output, and code segments.

Last edited by Don Cragun; 04-10-2017 at 10:04 AM.. Reason: Change HTML and ICODE tags to CODE tags; add ICODE tags.