Hi,
I am trying to write a script for some operators at our office which they can use to stop/start the helpdesk application during the night, as they are the only ones using this application, Remedy.
The idea is to use RBAC for this. The underlying init-script however su's to the user the application it is run under, and then requests a password for the remedy user.
______________
Underlying init script
______________
REMEDY_HOME=/opt/remedy/product/5.1.2
SERVLET_HOME=/opt/remedy/product/4.1.1/servletexec
export REMEDY_HOME SERVLET_HOME
case "$1" in
start)
echo "starting remedy"
su - remedy -c "$REMEDY_HOME/server/bin/arsystem start"
$SERVLET_HOME/ServletExecAS/<servername>/StartServletExec
;;
stop)
echo "stopping remedy"
$SERVLET_HOME/ServletExecAS/<servername>/StopServletExec
su - remedy -c "$REMEDY_HOME/server/bin/arsystem stop"
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0
______________
This is not something i like.
I would like to see the script not needing a password, just the user executing a script which calls the /etc/init.d/remedy script.
___________
I'm in yer face, even when you don't want me to be
___________
I am trying to write a script for some operators at our office which they can use to stop/start the helpdesk application during the night, as they are the only ones using this application, Remedy.
The idea is to use RBAC for this. The underlying init-script however su's to the user the application it is run under, and then requests a password for the remedy user.
______________
Underlying init script
______________
REMEDY_HOME=/opt/remedy/product/5.1.2
SERVLET_HOME=/opt/remedy/product/4.1.1/servletexec
export REMEDY_HOME SERVLET_HOME
case "$1" in
start)
echo "starting remedy"
su - remedy -c "$REMEDY_HOME/server/bin/arsystem start"
$SERVLET_HOME/ServletExecAS/<servername>/StartServletExec
;;
stop)
echo "stopping remedy"
$SERVLET_HOME/ServletExecAS/<servername>/StopServletExec
su - remedy -c "$REMEDY_HOME/server/bin/arsystem stop"
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
;;
esac
exit 0
______________
This is not something i like.
I would like to see the script not needing a password, just the user executing a script which calls the /etc/init.d/remedy script.
___________
I'm in yer face, even when you don't want me to be
___________