sudo permission to jdapp (sudo su – jdapp) for chkprod user.

# visudo             ^ This edits “/etc/sudoers” file. Added the following lines.

Cmnd_Alias JDAPP=/u01/app/jd-apps/bin/
chkprod ALL=(jdapp) NOPASSWD: JDAPP,/bin/bash  ^Allowing “chkprod” to su as “jdapp” and he can execute “” and given access to “Bash shell”.


* * su will always prompt for password. Entering the password for chkprod when running ” # sudo su – jboss “ will allow changing to the jdapp user.
* * Running ” sudo -u jboss /bin/bash ” as chkprod will allow the change to jdapp user without entering password.

Leave a Reply

Your email address will not be published. Required fields are marked *