linux - Running a shell subscript as the parent script's user -
if want call shell script within main script file particular user, how go doing it? child script seems loose context of user running , haven't found useful sub-scripting techniques.
ex: war-install.sh
if [ ! -d /opt/tomcat/ ] ./tomcat-install-files/install.sh fi
the problem here if run war-install.sh root or sudo command, ./tomcat-install-files/install.sh seems lose sudo/root context. how can rectify this?
thanks!
i agree roosh weird going on. in general run command user:
sudo -l <user> <cmd>
Comments
Post a Comment